public void ChildSpecificAccept() { var targetClassDefinition = DefinitionObjectMother.CreateTargetClassDefinition(typeof(BaseType1), typeof(BT1Mixin1)); var mixinDefinition = targetClassDefinition.Mixins[0]; var requiredTargetCallTypeDefinition = DefinitionObjectMother.CreateRequiredTargetCallTypeDefinition(targetClassDefinition, typeof(IBT1Mixin1)); var requiredNextCallTypeDefinition = DefinitionObjectMother.CreateRequiredNextCallTypeDefinition(targetClassDefinition, typeof(IBT1Mixin1)); var requiredMixinTypeDefinition = DefinitionObjectMother.CreateRequiredMixinTypeDefinition(targetClassDefinition, typeof(BT1Mixin2)); var composedInterfaceDependencyDefinition = DefinitionObjectMother.CreateComposedInterfaceDependencyDefinition(targetClassDefinition); var visitorMock = MockRepository.GenerateMock <IDefinitionVisitor> (); using (visitorMock.GetMockRepository().Ordered()) { visitorMock.Expect(mock => mock.Visit(targetClassDefinition)); visitorMock.Expect(mock => mock.Visit(mixinDefinition)); visitorMock.Expect(mock => mock.Visit(requiredTargetCallTypeDefinition)); visitorMock.Expect(mock => mock.Visit(requiredNextCallTypeDefinition)); visitorMock.Expect(mock => mock.Visit(requiredMixinTypeDefinition)); visitorMock.Expect(mock => mock.Visit(composedInterfaceDependencyDefinition)); } visitorMock.Replay(); targetClassDefinition.Accept(visitorMock); visitorMock.VerifyAllExpectations(); }