Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | Properties | List of all members
KSP.Testing.TestManager Class Reference

N3X15's shoddy Unit Testing framework, as standard frameworks don't work within Unity. More...

Static Public Member Functions

static void AddTest (UnitTest test)
 Add a test to the system. More...
 
static void ClearUnitTests ()
 
static TestResults RunTests ()
 Run the tests More...
 

Properties

static bool HaveUnitTests [get]
 Do we have any unit tests loaded? (Used to show Unit Testing button on main screen) More...
 

Detailed Description

N3X15's shoddy Unit Testing framework, as standard frameworks don't work within Unity.

Create a class inheriting UnitTest for each class of tests, then an arbitrary method for each test with the TestInfo attribute. Shove your tests into a plugin DLL and they'll be executed after plugin load. If no tests are present, the testing framework will not output anything, presenting a clean log.

Tested by N3X15 3/22/2012

Member Function Documentation

static void KSP.Testing.TestManager.AddTest ( UnitTest  test)
inlinestatic

Add a test to the system.

Parameters
test
static void KSP.Testing.TestManager.ClearUnitTests ( )
inlinestatic
static TestResults KSP.Testing.TestManager.RunTests ( )
inlinestatic

Run the tests

Returns
Return results.

Property Documentation

bool KSP.Testing.TestManager.HaveUnitTests
staticget

Do we have any unit tests loaded? (Used to show Unit Testing button on main screen)


The documentation for this class was generated from the following file: