Created
March 11, 2014 13:13
-
-
Save khalidabuhakmeh/9485342 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 BusinessMappingTests | |
| { | |
| public BusinessMappingTests() | |
| { | |
| Mapper.Initialize(cfg => cfg.AddProfile<BusinessMappingProfile>()); | |
| Mapper.AssertConfigurationIsValid(); | |
| } | |
| [Fact] | |
| public void Can_map_editmodel_to_business() | |
| { | |
| var model = new EditModel {}; | |
| Mapper.Map<Business>(model); | |
| } | |
| [Fact] | |
| public void Can_map_business_to_editmodel() | |
| { | |
| var business = new Business(); | |
| Mapper.Map<EditModel>(business); | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use StuctureMap to just pick up and register the profiles.
Then I load them on startup like this.
Easy Peesy....