Ejemplo n.º 1
0
        public void SuitesSampleReportTags()
        {
            string res = Composer.ComposeTestSuites(BuildFilename(sampleReport));

            Assert.True(res.Contains("<testsuites tests=\"1\" failures=\"1\" errors=\"1\">"));
            Assert.True(res.Contains("<testsuite name=\"test_ui\" tests=\"1\" failures=\"1\" errors=\"1\" time=\"1\" skipped=\"0\" timestamp=\"2019-07-26T19:53:23\" hostname=\"DESKTOP-JK3JHVC\">"));
        }
Ejemplo n.º 2
0
        public void SuitesSpecDiff()
        {
            string res = Composer.ComposeTestSuites(BuildFilename(specExample));
            string correctUnsanitized = readCorrectFile(specExample, modeSuites);

            Assert.True(diffStrings(res, correctUnsanitized));
        }
Ejemplo n.º 3
0
        public void SuitesSpecTagPresent()
        {
            string res = Composer.ComposeTestSuites(BuildFilename(specExample));

            writeResultToFile(content: res);
            matchMainTags(res);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
        public void SuitesContainTestFailures()
        {
            string res = Composer.ComposeTestSuites(BuildFilename(specExample));

            Assert.True(res.Contains("<testsuites tests=\"45\" failures=\"17\" errors=\"0\">"));
        }