public void CasesSampleReportTags() { string res = Composer.ComposeTestCases(BuildFilename(sampleReport)); Assert.True(res.Contains("<testsuite tests=\"1\" failures=\"1\" errors=\"1\">")); Assert.True(res.Contains("<testcase name=\"Basic_test\" time=\"0\" classname=\"test_ui.Rxn1000.Multi.Bio.Emulator\">")); }
public void SuitesSampleReportDiff() { string res = Composer.ComposeTestCases(BuildFilename(sampleReport)); string correctStringUnsanitized = readCorrectFile(sampleReport, modeCases); Assert.True(diffStrings(res, correctStringUnsanitized)); }
public void CasesSpecDiff() { string res = Composer.ComposeTestCases(BuildFilename(specExample)); string correctStringUnsanitized = readCorrectFile(specExample, modeCases); Assert.True(diffStrings(res, correctStringUnsanitized)); }
public void CasesSpecTagPresent() { string res = Composer.ComposeTestCases(BuildFilename(specExample)); writeResultToFile(res); matchTag("testsuite", res); matchTag("testcase", res); }
public void LogCorrectTests() { bool active = false; if (active) { string suitesRes = Composer.ComposeTestSuites(BuildFilename(specExample)); string casesRes = Composer.ComposeTestCases(BuildFilename(specExample)); string casesTarget = String.Format("correct{0}{1}-{2}.correct", Path.DirectorySeparatorChar, specExample, modeCases); string suitesTarget = String.Format("correct{0}{1}-{2}.correct", Path.DirectorySeparatorChar, specExample, modeSuites); writeResultToFile(casesRes, casesTarget); writeResultToFile(suitesRes, suitesTarget); string suitesSampleRes = Composer.ComposeTestSuites(BuildFilename(sampleReport)); string casesSampleRes = Composer.ComposeTestCases(BuildFilename(sampleReport)); string cases_sample_target = String.Format("correct{0}{1}-{2}.correct", Path.DirectorySeparatorChar, sampleReport, modeCases); string suites_sample_target = String.Format("correct{0}{1}-{2}.correct", Path.DirectorySeparatorChar, sampleReport, modeSuites); writeResultToFile(suitesSampleRes, suites_sample_target); writeResultToFile(casesSampleRes, cases_sample_target); } Assert.False(active); }
public void CasesContainTestFailuresErrors() { string res = Composer.ComposeTestCases(BuildFilename(specExample)); Assert.True(res.Contains("<testsuite tests=\"45\" failures=\"17\" errors=\"0\">")); }