AspUnitRunner.Sample.Tests.NUnit.TestAsp.TestCase C# (CSharp) Method

TestCase() private method

private TestCase ( [ testContainer ) : void
testContainer [
return void
        public void TestCase(
            // set ASPUnit test containers here
            [Values("CalculatorTest", "StringUtilityTest", "FailureTest")] string testContainer
        )
        {
            var runner = Runner.Create(AspTestUrl)
                .WithEncoding(Encoding.UTF8)
                .WithTestContainer(testContainer);
            var results = runner.Run();

            // this results in slightly cleaner output than Assert.That(results.Successful...)
            if (!results.Successful)
                Assert.Fail(results.Format());

            if (results.Tests == 0)
                Assert.Inconclusive("0 tests were run");
        }