public void RunNamespace_EmptyNamespace_RanOneTest()
        {
            var testListener       = new FakeTestListener();
            var testFile           = Path.Combine(tempDir, "empty-namespace.dll");
            var assemblyReferences = new[] { "nunit.framework.dll" };
            var expectedName       = "TestClass.TestMethod";
            var source             = @"
using NUnit.Framework;
public class TestClass
{
    [Test]
    public void TestMethod() {}
}";
            var assemblyFile       = CompilerUtilities.Compile(testFile, assemblyReferences, source);
            var testAssembly       = Assembly.LoadFrom(testFile);
            var testRunner         = createTestRunner();

            var state = testRunner.RunNamespace(testListener, testAssembly, "");

            var testNames = testListener.GetTestNames();

            Assert.AreEqual(1, testNames.Count, "Check 1 ran.");
            Assert.IsTrue(testNames.Contains(expectedName), "Check for test name: " + expectedName);
            Assert.AreEqual(TestRunState.Success, state, "Check for success.");
        }
        public void RunAssembly_WithNoTests_NoTests()
        {
            var testListener       = new FakeTestListener();
            var testFile           = Path.Combine(tempDir, "no-tests.dll");
            var assemblyReferences = new[] { "nunit.framework.dll" };
            var source             = "class NoTests {}";
            var assemblyFile       = CompilerUtilities.Compile(testFile, assemblyReferences, source);
            var testAssembly       = Assembly.LoadFrom(testFile);
            var testRunner         = createTestRunner();

            var state = testRunner.RunAssembly(testListener, testAssembly);

            Assert.AreEqual(TestRunState.NoTests, state, "check no tests were found");
        }