Skip to content

Instantly share code, notes, and snippets.

@darrencauthon
Created September 11, 2010 12:36
Show Gist options
  • Save darrencauthon/575154 to your computer and use it in GitHub Desktop.
Save darrencauthon/575154 to your computer and use it in GitHub Desktop.
public class ObjectUnderTest
{
private string _prefix;
public ObjectUnderTest(string prefix)
{
_prefix = prefix;
}
public void MapObject(Person input)
{
AutoMapper.Mapper.CreateMap<Person, PersonModel>();
}
}
public class Person {}
public class PersonModel
{
public string IDoNotExistInPerson { get; set; }
}
[TestFixture]
public class TestClass
{
[Test]
public void Test1()
{
AutoMapper.Mapper.AssertConfigurationIsValid();
var test = new ObjectUnderTest(null);
test.MapObject(null);
AutoMapper.Mapper.AssertConfigurationIsValid();
}
[Test]
public void Test2()
{
AutoMapper.Mapper.AssertConfigurationIsValid();
var test = new ObjectUnderTest(null);
test.MapObject(null);
AutoMapper.Mapper.AssertConfigurationIsValid();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment