AddJoin() public method

public AddJoin ( JoinMapping join ) : void
join JoinMapping
return void
        public void ShouldWriteTheJoins()
        {
            var classMapping = new ClassMapping();
            classMapping.AddJoin(new JoinMapping());

            var joinDocument = new XmlDocument();
            joinDocument.AppendChild(joinDocument.CreateElement("join"));

            var joinWriter = MockRepository.GenerateMock<IXmlWriter<JoinMapping>>();
            joinWriter
                .Expect(x => x.Write(classMapping.Joins.First()))
                .Return(joinDocument);

            XmlClassWriter writer = new XmlClassWriter(null, null, null, null, null, joinWriter);

            writer.VerifyXml(classMapping)
                .Element("join").Exists();
        }
        public void ShouldWriteJoin()
        {
            var mapping = new ClassMapping();

            mapping.AddJoin(new JoinMapping());

            writer.VerifyXml(mapping)
                .Element("join").Exists();
        }