public void Write(string path, nTestSuite suite)
        {
            using (_w = new StreamWriter(path))
              {
            int failed = 0;

            Log("Test results:\n============\n");
            Log("Raw test results:\n----------------");
            foreach (var testset in suite.Results) {
              PrintClassInfo(testset);
              foreach (var test in testset.Results) {
            PrintMethodInfo(testset, test, true);
              }
            }

            Log("\nSummary test results:\n--------------------");
            foreach (var testset in suite.Results) {
              PrintClassInfo(testset, true);
              foreach (var test in testset.Results) {
            PrintMethodInfo(testset, test);
            if (!test.Success)
              ++failed;
              }
            }

            Log("\nSummary results:\n---------------") ;
            foreach (var testset in suite.Results) {
              PrintClassInfo(testset);
            }

            Log ("- Total: {0} tests failed", failed);
              }
        }
Example #2
0
 protected override void Setup(nTestSuite tests)
 {
     tests.type = typeof(MyTests);
     tests.type = typeof(MyTests2);
     tests.type = typeof(nDbRecordTests);
     tests.type = typeof(RecordSerializerTests);
 }
Example #3
0
        public void Write(string path, nTestSuite suite)
        {
            int failed = 0;

              Log("Test results:\n============\n");
              Log("Raw test results:\n----------------");
              foreach (var testset in suite.Results) {
            PrintClassInfo(testset);
            foreach (var test in testset.Results) {
              PrintMethodInfo(testset, test, true);
            }
              }

              Log("\nSummary test results:\n--------------------");
              foreach (var testset in suite.Results) {
            PrintClassInfo(testset, true);
            foreach (var test in testset.Results) {
              PrintMethodInfo(testset, test);
              if (!test.Success)
            ++failed;
            }
              }

              Log("\nSummary results:\n---------------") ;
              foreach (var testset in suite.Results) {
            PrintClassInfo(testset);
              }

              Log ("- Total: {0} tests failed", failed);

              if (failed > 0) {
            Log("\nFAILING TESTS:\n-------------") ;
            foreach (var testset in suite.Results) {
              foreach(var test in testset.Results) {
            if (!test.Success)
              PrintMethodInfo(testset, test);
              }
            }
              }
              Flush();
        }