public void TypeMapper_GetType_AndReturnValidAnswer() { var actual = _mapper.TypeMapper(typeof (UserRegistertionData)); var expected = new UserTable().GetType(); Assert.IsTrue(actual.Name == expected.Name); }
public void Login_UserExist() { var userTable = new UserTable(); var login = new UserLoginDto { Email = "*****@*****.**", Password = "******" }; _dataBase.Expect(x => x.FindBy(Arg<Expression<Func<UserTable, bool>>>.Is.Anything)).Return(new List<UserTable> { userTable }); _mapper.Stub(x => x.Map(userTable)).Return(new UserRegistertionData()); var actual = _service.Login(login); Assert.AreEqual(actual.GetType(), typeof(UserData)); }