public void ChildSpecificAccept() { var visitorMock = MockRepository.GenerateMock <IDefinitionVisitor>(); var definition = DefinitionObjectMother.CreateTargetClassDefinition(typeof(BaseType1), typeof(BT1Mixin1)).Mixins[0]; var interfaceIntroduction = DefinitionObjectMother.CreateInterfaceIntroductionDefinition(definition); var nonInterfaceIntroduction = DefinitionObjectMother.CreateNonInterfaceIntroductionDefinition(definition); var attributeIntroduction = DefinitionObjectMother.CreateAttributeIntroductionDefinition(definition); var nonAttributeIntroduction = DefinitionObjectMother.CreateNonAttributeIntroductionDefinition(definition); var suppressedAttributeIntroduction = DefinitionObjectMother.CreateSuppressedAttributeIntroductionDefinition(definition); var targetCallDependency = DefinitionObjectMother.CreateTargetCallDependencyDefinition(definition); var nextCallDependency = DefinitionObjectMother.CreateNextCallDependencyDefinition(definition); var mixinDependency = DefinitionObjectMother.CreateMixinDependencyDefinition(definition); using (visitorMock.GetMockRepository().Ordered()) { visitorMock.Expect(mock => mock.Visit(definition)); visitorMock.Expect(mock => mock.Visit(interfaceIntroduction)); visitorMock.Expect(mock => mock.Visit(nonInterfaceIntroduction)); visitorMock.Expect(mock => mock.Visit(attributeIntroduction)); visitorMock.Expect(mock => mock.Visit(nonAttributeIntroduction)); visitorMock.Expect(mock => mock.Visit(suppressedAttributeIntroduction)); visitorMock.Expect(mock => mock.Visit(targetCallDependency)); visitorMock.Expect(mock => mock.Visit(nextCallDependency)); visitorMock.Expect(mock => mock.Visit(mixinDependency)); } visitorMock.Replay(); PrivateInvoke.InvokeNonPublicMethod(definition, "ChildSpecificAccept", visitorMock); visitorMock.VerifyAllExpectations(); }