This repository has been archived on 2020-06-09. You can view files and clone it, but cannot push or open issues or pull requests.
dotnet-nhibernate-test/ConsoleApp1/Model/PersonMapTest.cs
2020-06-09 00:12:01 +02:00

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);
}
}
}