public void MapModelToBO() { var mapper = new BOLProvinceMapper(); ApiProvinceRequestModel model = new ApiProvinceRequestModel(); model.SetProperties(1, "A"); BOProvince response = mapper.MapModelToBO(1, model); response.CountryId.Should().Be(1); response.Name.Should().Be("A"); }
public void MapBOToModel() { var mapper = new BOLProvinceMapper(); BOProvince bo = new BOProvince(); bo.SetProperties(1, 1, "A"); ApiProvinceResponseModel response = mapper.MapBOToModel(bo); response.CountryId.Should().Be(1); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLProvinceMapper(); BOProvince bo = new BOProvince(); bo.SetProperties(1, 1, "A"); List <ApiProvinceResponseModel> response = mapper.MapBOToModel(new List <BOProvince>() { { bo } }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALProvinceMapper(); Province entity = new Province(); entity.SetProperties(1, 1, "A"); BOProvince response = mapper.MapEFToBO(entity); response.CountryId.Should().Be(1); response.Id.Should().Be(1); response.Name.Should().Be("A"); }
public void MapBOToEF() { var mapper = new DALProvinceMapper(); var bo = new BOProvince(); bo.SetProperties(1, 1, "A"); Province response = mapper.MapBOToEF(bo); response.CountryId.Should().Be(1); response.Id.Should().Be(1); response.Name.Should().Be("A"); }