示例#1
0
文件: MapTest.cs 项目: NetUtil/Util
 public void TestAssign() {
     var info = new UserDto();
     _map.Map( _user, info );
     Assert.AreEqual( UserTest.OrganizationId, info.OrganizationId, "OrganizationId" );
     Assert.AreEqual( UserTest.UserName, info.UserName, "UserName" );
     Assert.AreEqual( UserTest.Password, info.Password, "Password" );
     Assert.AreEqual( UserTest.SafePassword, info.SafePassword, "SafePassword" );
     Assert.AreEqual( UserTest.Email, info.Email, "Email" );
     Assert.AreEqual( UserTest.MobilePhone, info.MobilePhone, "MobilePhone" );
     Assert.AreEqual( UserTest.Question, info.Question, "Question" );
     Assert.AreEqual( UserTest.Answer, info.Answer, "Answer" );
     Assert.AreEqual( UserTest.IsLock, info.IsLock, "IsLock" );
     Assert.AreEqual( UserTest.LockBeginTime, info.LockBeginTime, "LockBeginTime" );
     Assert.AreEqual( UserTest.LockTime, info.LockTime, "LockTime" );
     Assert.AreEqual( UserTest.LockMessage, info.LockMessage, "LockMessage" );
     Assert.AreEqual( UserTest.LastLoginTime, info.LastLoginTime, "LastLoginTime" );
     Assert.AreEqual( UserTest.LastLoginIp, info.LastLoginIp, "LastLoginIp" );
     Assert.AreEqual( UserTest.CurrentLoginTime, info.CurrentLoginTime, "CurrentLoginTime" );
     Assert.AreEqual( UserTest.CurrentLoginIp, info.CurrentLoginIp, "CurrentLoginIp" );
     Assert.AreEqual( UserTest.LoginTimes, info.LoginTimes, "LoginTimes" );
     Assert.AreEqual( UserTest.LoginFailTimes, info.LoginFailTimes, "LoginFailTimes" );
     Assert.AreEqual( UserTest.Note, info.Note, "Note" );
     Assert.AreEqual( UserTest.Enabled, info.Enabled, "Enabled" );
     Assert.AreEqual( UserTest.DisableTime, info.DisableTime, "DisableTime" );
     Assert.AreEqual( UserTest.CreateTime, info.CreateTime, "CreateTime" );
     Assert.AreEqual( UserTest.RegisterIp, info.RegisterIp, "RegisterIp" );
 }
示例#2
0
文件: MapTest.cs 项目: NetUtil/Util
 public void TestPerformance_HardCode() {
     for ( int i = 0; i < 1000000; i++ ) {
         UserDto dto = new UserDto( _user );
         _user = dto.ToEntity();
     }
 }