public void MapModelToEntity() { var mapper = new DALUserMapper(); ApiUserServerRequestModel model = new ApiUserServerRequestModel(); model.SetProperties("A", "A"); User response = mapper.MapModelToEntity(1, model); response.Password.Should().Be("A"); response.Username.Should().Be("A"); }
public void MapEntityToModel() { var mapper = new DALUserMapper(); User item = new User(); item.SetProperties(1, "A", "A"); ApiUserServerResponseModel response = mapper.MapEntityToModel(item); response.Id.Should().Be(1); response.Password.Should().Be("A"); response.Username.Should().Be("A"); }
public void MapEntityToModelList() { var mapper = new DALUserMapper(); User item = new User(); item.SetProperties(1, "A", "A"); List <ApiUserServerResponseModel> response = mapper.MapEntityToModel(new List <User>() { { item } }); response.Count.Should().Be(1); }