23 lines
574 B
C#
23 lines
574 B
C#
|
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<PersonMap>();
|
||
|
|
||
|
var mapping = mapper.CompileMappingForAllExplicitlyAddedEntities();
|
||
|
var xmlSerializer = new XmlSerializer(mapping.GetType());
|
||
|
|
||
|
xmlSerializer.Serialize(Console.Out, mapping);
|
||
|
}
|
||
|
}
|
||
|
}
|