[Test] public void RunHtmlFileTest() { using (ITestAdapter adapter = JSNet.ClosureLibrary(basejsfile)) { ITestResults results = adapter.RunTest(@"J:\dev\Projects\Misc\closure-library\closure\goog\array\array_test.html"); Assert.AreEqual(0, results.Failed.Count(), results.ToString()); Assert.AreEqual(73, results.Passed.Count(), results.ToString()); } }
[Test] public void TestHtmlFileWithSrcFiles() { using (ITestAdapter adapter = JSNet.ClosureLibrary(basejsfile)) { ITestResults results = adapter.RunTest(@"resources\test_with_src_files.html"); Assert.AreEqual(0, results.Failed.Count(), results.ToString()); Assert.AreEqual(65, results.Passed.Count(), results.ToString()); } }
[Test] public void RunJSFileTest() { using (ITestAdapter adapter = JSNet.ClosureLibrary(basejsfile)) { ITestResults results = adapter.RunTest(@"resources\simple_closure_tests.js"); Assert.AreEqual(0, results.Failed.Count(), results.ToString()); Assert.AreEqual(66, results.Passed.Count(), results.ToString()); } }
[Test] public void AssertThatTheClosureTestWorksWithoutAnyCoverageStuff() { using (ITestAdapter adapter = JSNet.ClosureLibrary(basejsfile)) { adapter.LoadSourceFile(@"resources\jscoverage\src\jscoverage_source.js"); ITestResults results = adapter.RunTest(@"resources\jscoverage\jscoverage_test.js"); Assert.AreEqual(0, results.Failed.Count(), results.ToString()); Assert.AreEqual(4, results.Passed.Count(), results.ToString()); } }