public void Create_InputDtoAddUser_AreSame() { var input = new InputDtoAddUser("nameUser", "password", "emailUser"); _userFactory.CreateUserFromValues(input.Name, input.Password, input.Email, "user").Returns(new User(input.Name, input.Password, input.Email, "user")); var iuser = _userFactory.CreateUserFromValues(input.Name, input.Password, input.Email, "user"); _userRepository.Query().Returns(getUserList()); _userRepository.Create(iuser).Returns(new User(input.Name, input.Password, input.Email, "user")); var res = _userService.Create(input); var expected = new OutputDtoAddUser("nameUser", "password", "emailUser", "user"); Assert.AreEqual(expected, res); }
protected bool Equals(OutputDtoAddUser other) { return(Id == other.Id && Name == other.Name && Password == other.Password && Email == other.Email && Role == other.Role); }