public void Should_pass_subclasses_to_the_visitor()
        {
            var classMap = new ClassMapping {Name = "class1" };
            classMap.AddSubclass(new JoinedSubclassMapping());

            var visitor = MockRepository.GenerateMock<IMappingModelVisitor>();
            visitor.Expect(x => x.Visit(classMap.Subclasses.First()));

            classMap.AcceptVisitor(visitor);

            visitor.VerifyAllExpectations();
        }
        public void Should_write_the_subclasses()
        {
            var classMapping = new ClassMapping();
            classMapping.AddSubclass(new JoinedSubclassMapping());

            _mocker.Get<IHbmWriter<ISubclassMapping>>()
                .Expect(x => x.Write(classMapping.Subclasses.First()))
                .Return(new HbmJoinedSubclass());

            _classWriter.VerifyXml(classMapping)
                .Element("joined-subclass").Exists();
        }