/** * Main entry point. * Runs unit tests for the unit testing framework. * * @param args, array of string arguments. */ static void Main(string[] args) { try { // Create the test suite TestSuite suite = new TestSuite(); // Add tests to the test suite suite.AddAll((TestCase)new Weapons_Test()); // Run the tests TestResult result = suite.Run(null); // Report test results TestReporter reporter = new TestReporter(); reporter.LogResults(result); } catch (Exception e) { // Log uncaught exceptions System.Console.WriteLine(e.ToString()); } // Set a break point here for testing to examine console output //int pause = 0; }
/** * Initialize class resources. */ void Start() { // Create test suite TestSuite suite = new TestSuite(); // For each assembly in this app domain foreach (Assembly assem in AppDomain.CurrentDomain.GetAssemblies()) { // For each type in the assembly foreach (Type type in assem.GetTypes()) { // If this is a valid test case // i.e. derived from TestCase and instantiable if (typeof(TestCase).IsAssignableFrom(type) && type != typeof(TestCase) && !type.IsAbstract) { // Add tests to suite suite.AddAll(type.GetConstructor(new Type[0]).Invoke(new object[0]) as TestCase); } } } // Run the tests TestResult res = suite.Run(null); // Report results Unity3D_TestReporter reporter = new Unity3D_TestReporter(); reporter.LogResults(res); }
/** * Initialize class resources. */ void Start() { //CreateDababase Schema CreateDatabase.Main(); // Create test suite TestSuite suite = new TestSuite(); // Example: Add tests to suite suite.AddAll(new UserDAOTest()); suite.AddAll(new MessageDAOTest()); suite.AddAll(new FriendshipDAOTest()); // Run the tests TestResult res = suite.Run(null); // Report results Unity3D_TestReporter reporter = new Unity3D_TestReporter(); reporter.LogResults(res); }
/** * Initialize class resources. */ void Start() { // Create test suite TestSuite suite = new TestSuite(); suite.AddAll((TestCase)new Everythings_There_Test()); // Run the tests TestResult res = suite.Run(null); // Report results Unity3D_TestReporter reporter = new Unity3D_TestReporter(); reporter.LogResults(res); }
/** * Initialize class resources. */ public static void UnitTest() { // Create test suite TestSuite suite = new TestSuite(); // Example: Add tests to suite suite.AddAll(new EMScheduler_Test()); // Run the tests TestResult res = suite.Run(null); // Report results Unity3D_TestReporter reporter = new Unity3D_TestReporter(); reporter.LogResults(res); }
/** * Initialize class resources. */ void Start() { // Create test suite TestSuite suite = new TestSuite(); // Example: Add tests to suite suite.AddAll(new Dummy_Test()); // Run the tests TestResult res = suite.Run(null); // Report results Unity3D_TestReporter reporter = new Unity3D_TestReporter(); reporter.LogResults(res); }