Beispiel #1
0
 public void FullUserToPartialUser()
 {
     FullUserToPartialUserMap map = new FullUserToPartialUserMap();
     User user = GetFullUser();
     UserModel partial = map.Create(user);
     AssertEqual(user, partial);
 }
Beispiel #2
0
        public void FullUserToPartialUser()
        {
            FullUserToPartialUserMap map = new FullUserToPartialUserMap();
            User      user    = GetFullUser();
            UserModel partial = map.Create(user);

            AssertEqual(user, partial);
        }
Beispiel #3
0
 public void FullUserToPartialUser_WithAutoMap()
 {
     FullUserToPartialUserMap map = new FullUserToPartialUserMap();
     map.AutoMapUnspecifiedTargets = true;
     User user = GetFullUser();
     UserModel partial = map.Create(user);
     AssertEqual(user, partial);
     //date of birth is not specified, but should  be auto-mapped:
     Assert.AreEqual(user.DateOfBirth, partial.DateOfBirth);
 }
 public void FullUserToPartialUser()
 {
     for (int i = 0; i < PerformanceIterations; i++)
     {
         var map = new FullUserToPartialUserMap();
         var user = GetFullUser();
         var partial = map.Create(user);
         AssertEqual(user, partial);
     }
 } 
 public void FullUserToPartialUser()
 {
     for (int i = 0; i < PerformanceIterations; i++)
     {
         var map     = new FullUserToPartialUserMap();
         var user    = GetFullUser();
         var partial = map.Create(user);
         AssertEqual(user, partial);
     }
 }
Beispiel #6
0
        public void FullUserToPartialUser_WithAutoMap()
        {
            FullUserToPartialUserMap map = new FullUserToPartialUserMap();

            map.AutoMapUnspecifiedTargets = true;
            User      user    = GetFullUser();
            UserModel partial = map.Create(user);

            AssertEqual(user, partial);
            //date of birth is not specified, but should  be auto-mapped:
            Assert.AreEqual(user.DateOfBirth, partial.DateOfBirth);
        }