using System; using System.Xml.Serialization; using NHibernate.Mapping.ByCode; using NUnit.Framework; namespace ConsoleApp1.Model { [TestFixture] public class PersonMapTest { [Test] public void CanGenerateXmlMapping() { var mapper = new ModelMapper(); mapper.AddMapping(); var mapping = mapper.CompileMappingForAllExplicitlyAddedEntities(); var xmlSerializer = new XmlSerializer(mapping.GetType()); xmlSerializer.Serialize(Console.Out, mapping); } } }