Created
September 11, 2010 12:36
-
-
Save darrencauthon/575154 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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