Exemplo n.º 1
0
        public void failure_is_reported_when_no_tests_run()
        {
            TestSuites suites =
                XmlParser.Get(@"<testsuites>
                                      <testsuite name=""uspBillOfMaterials"" tests=""0"" errors=""0"" failures=""0"">                        
                                      </testsuite>
                                    </testsuites>");

            Assert.IsFalse(suites.Passed());
        }
Exemplo n.º 2
0
        public void success_is_reported_when_all_tests_pass()
        {
            TestSuites suites =
                XmlParser.Get(@"<testsuites>
          <testsuite name=""uspBillOfMaterials"" tests=""1"" errors=""0"" failures=""0"">            
            <testcase classname=""uspBillOfMaterials"" name=""test does not return level 2 components of a level 0 assembly"">              
            </testcase>
          </testsuite>
        </testsuites>");


            Assert.IsTrue(suites.Passed());
        }
Exemplo n.º 3
0
        public void failure_is_reported_when_a_test_fails()
        {
            TestSuites suites =
                XmlParser.Get(@"<testsuites>
          <testsuite name=""uspBillOfMaterials"" tests=""1"" errors=""0"" failures=""1"">            
            <testcase classname=""uspBillOfMaterials"" name=""test does not return level 2 components of a level 0 assembly"">
              <failure message=""TODO:Implement this test."" />
            </testcase>
          </testsuite>
        </testsuites>");


            Assert.IsFalse(suites.Passed());
        }