Exemplo n.º 1
0
        public void TestAddWithAssemblyLoadInvalidDoesNotAddAssemblyAndReturnsNull()
        {
            NUnitSuiteForTest suite = new NUnitSuiteForTest("suite-name");

            suite.IsLoadedTestNull = true;

            Assembly assembly = typeof(TestFixtureStubOne).Assembly;

            ITest test = suite.Add(assembly);

            Assert.IsNull(test);
            Assert.IsFalse(suite.ContainsAssembly(assembly));
            CollectionAssert.IsEmpty(suite.TestAssemblies);
        }
Exemplo n.º 2
0
        public void TestAddWithAssemblyLoadNotRunnableDoesNotAddAssemblyAndReturnsErroneousTest()
        {
            NUnitSuiteForTest suite = new NUnitSuiteForTest("suite-name");

            suite.IsLoadedTestInvalid = true;

            Assembly assembly = typeof(TestFixtureStubOne).Assembly;

            ITest test = suite.Add(assembly);

            Assert.IsNotNull(test);
            Assert.AreEqual(RunState.NotRunnable, test.RunState);
            Assert.IsFalse(suite.ContainsAssembly(assembly));
            CollectionAssert.IsEmpty(suite.TestAssemblies);
        }