public void NewTestClassInNewCompilationUnitAddedToTestProjectTestClasses()
        {
            MockClass myNewTestClass = MockClass.CreateMockClassWithoutAnyAttributes();

            myNewTestClass.SetDotNetName("MyNewTests");
            testFrameworks.AddTestClass(myNewTestClass);

            DefaultCompilationUnit newUnit = new DefaultCompilationUnit(myTestClass.ProjectContent);

            newUnit.Classes.Add(myTestClass);
            newUnit.Classes.Add(myNewTestClass);

            testProject.UpdateParseInfo(oldUnit, newUnit);

            Assert.AreEqual(myNewTestClass, testProject.TestClasses[1].Class);
        }
        public void Init()
        {
            testFrameworks = new MockRegisteredTestFrameworks();
            myTestClass    = MockClass.CreateMockClassWithoutAnyAttributes();
            myTestClass.SetDotNetName("MyTests");
            testFrameworks.AddTestClass(myTestClass);

            oldUnit = new DefaultCompilationUnit(myTestClass.ProjectContent);
            oldUnit.Classes.Add(myTestClass);

            testProject = new TestProject(myTestClass.Project, myTestClass.ProjectContent, testFrameworks);
        }
Example #3
0
        public void Init()
        {
            MockAttribute testAttribute = new MockAttribute("Test");

            classWithTestAttribute = MockClass.CreateMockClassWithAttribute(testAttribute);
            IProject project = classWithTestAttribute.MockProjectContent.ProjectAsIProject;

            classNodeForClassWithTestAttribute = new ClassNode(project, classWithTestAttribute);

            testFrameworks = new MockRegisteredTestFrameworks();
            testFrameworks.AddTestClass(classWithTestAttribute);

            testableCondition = new TestableCondition(testFrameworks);
        }