/** * Initialize class resources. */ public IEnumerator StartTest() { // Create test suite Unity3D_TestSuite suite = GameObject.Find("TestRunner").GetComponent<Unity3D_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(UnityTestCase).IsAssignableFrom(type) && type != typeof(UnityTestCase) && !type.IsAbstract) { // Add tests to suite UnityTestCase test = GameObject.Find("TestRunner").AddComponent(type.Name) as UnityTestCase; suite.AddAll(test); } else if (typeof(TestCase).IsAssignableFrom(type) && type != typeof(TestCase) && !type.IsAbstract) { suite.AddAll(type.GetConstructor(new Type[0]).Invoke(new object[0]) as TestCase); } } } // Run the tests yield return StartCoroutine(suite.Run(null)); TestResult res = suite.TestResult; // Report results Unity3D_TestReporter reporter = new Unity3D_TestReporter(); reporter.LogResults(res); }
/** * 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); }
protected void TestCategory(TestCase _category, string _prefix) { TestSuite suite = new TestSuite(); suite.AddAll(_category); TestResult res = suite.Run(null); Unity3D_TestReporter reporter = new Unity3D_TestReporter(); reporter.LogResults(res, _prefix); }
/** * 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. */ 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); }
/** * Initialize class resources. */ public IEnumerator StartTest() { // Create test suite Unity3D_TestSuite suite = gameObject.AddComponent<Unity3D_TestSuite>(); AddCompornents(suite); // Run the tests yield return StartCoroutine(suite.Run(null)); TestResult res = suite.TestResult; // 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. */ public IEnumerator StartTest() { bool defalutRunInBackground = Application.runInBackground; Application.runInBackground = true; // Create test suite Unity3D_TestSuite suite = gameObject.AddComponent<Unity3D_TestSuite>(); AddCompornents(suite); // Run the tests yield return StartCoroutine(suite.Run(null)); TestResult res = suite.TestResult; // Report results Unity3D_TestReporter reporter = new Unity3D_TestReporter(); reporter.LogResults(res); Application.runInBackground = defalutRunInBackground; }
/** * Initialize class resources. */ protected virtual IEnumerator Start() { // Create test suite TestResult ret = new TestResult(); Unity3D_TestSuite suite = new Unity3D_TestSuite(this, ret); // Add test cases TestCase[] testcases = this.TestCases; foreach (TestCase tc in testcases) suite.AddAll(tc); // Run the tests yield return StartCoroutine(suite.RunAll()); // Report results Unity3D_TestReporter reporter = new Unity3D_TestReporter(); reporter.LogResults(ret); }
/** * 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); }