DefaultField AddTestFieldDefinedAsTestMemberToClass(string name) { var field = new DefaultField(fakeClass, name); fakeClass.Fields.Add(field); fakeRegisteredTestFrameworks.AddTestMember(field); return(field); }
public void Init() { mockTestClass = MockClass.CreateMockClassWithoutAnyAttributes(); mockTestClass.FullyQualifiedName = "DerivedClass"; testMethod = new MockMethod(mockTestClass, "myTestMethod"); mockTestClass.Methods.Add(testMethod); mockBaseTestClass = MockClass.CreateMockClassWithoutAnyAttributes(); mockBaseTestClass.FullyQualifiedName = "BaseClass"; mockBaseTestClass.Methods.Add(baseClassTestMethod); baseClassTestMethod = new MockMethod(mockBaseTestClass, "myBaseTestMethod"); testFrameworks = new MockRegisteredTestFrameworks(); testFrameworks.AddTestMember(testMethod); testFrameworks.AddTestMember(baseClassTestMethod); mockTestClass.AddBaseClass(mockBaseTestClass); testClass = new TestClass(mockTestClass, testFrameworks); }
public void Init() { MockAttribute testAttribute = new MockAttribute("Test"); methodWithTestAttribute = MockMethod.CreateMockMethodWithAttribute(testAttribute); memberNodeForMethodWithTestAttribute = new MockMemberNode(methodWithTestAttribute); testFrameworks = new MockRegisteredTestFrameworks(); testFrameworks.AddTestMember(methodWithTestAttribute); testableCondition = new TestableCondition(testFrameworks); }