public void MapEntityToModelList() { var mapper = new DALVPersonMapper(); VPerson item = new VPerson(); item.SetProperties(1, "A"); List<ApiVPersonServerResponseModel> response = mapper.MapEntityToModel(new List<VPerson>() { { item} }); response.Count.Should().Be(1); }
public void MapModelToEntity() { var mapper = new DALVPersonMapper(); ApiVPersonServerRequestModel model = new ApiVPersonServerRequestModel(); model.SetProperties("A"); VPerson response = mapper.MapModelToEntity(1, model); response.PersonName.Should().Be("A"); }
public void MapEntityToModel() { var mapper = new DALVPersonMapper(); VPerson item = new VPerson(); item.SetProperties(1, "A"); ApiVPersonServerResponseModel response = mapper.MapEntityToModel(item); response.PersonId.Should().Be(1); response.PersonName.Should().Be("A"); }