コード例 #1
0
ファイル: TextUITests.cs プロジェクト: tytakoff/nunit
        public void ErrorsAndFailuresReportTest()
        {
            _textUI.DisplayErrorsAndFailuresReport(_result);
            var lines = GetReportLines();

            Assert.That(lines[0], Is.EqualTo("Errors and Failures"));
            Assert.That(lines[2], Is.EqualTo("1) Invalid : NUnit.Tests.Assemblies.MockTestFixture.NonPublicTest"));
            Assert.That(lines[3], Is.EqualTo("Method is not public"));
            Assert.That(lines[5], Is.EqualTo("2) Failed : NUnit.Tests.Assemblies.MockTestFixture.FailingTest"));
            Assert.That(lines[6], Is.EqualTo("Intentional failure"));
            Assert.That(lines[9], Is.EqualTo("3) Invalid : NUnit.Tests.Assemblies.MockTestFixture.NotRunnableTest"));
            Assert.That(lines[10], Is.EqualTo("No arguments were provided"));
            Assert.That(lines[12], Is.EqualTo("4) Error : NUnit.Tests.Assemblies.MockTestFixture.TestWithException"));
            Assert.That(lines[13], Is.EqualTo("System.Exception : Intentional Exception"));
        }