public void MapModelToBO() { var mapper = new BOLCountryRegionMapper(); ApiCountryRegionRequestModel model = new ApiCountryRegionRequestModel(); model.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); BOCountryRegion response = mapper.MapModelToBO("A", model); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Name.Should().Be("A"); }
public void MapBOToModel() { var mapper = new BOLCountryRegionMapper(); BOCountryRegion bo = new BOCountryRegion(); bo.SetProperties("A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); ApiCountryRegionResponseModel response = mapper.MapBOToModel(bo); response.CountryRegionCode.Should().Be("A"); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Name.Should().Be("A"); }
public void MapBOToModelList() { var mapper = new BOLCountryRegionMapper(); BOCountryRegion bo = new BOCountryRegion(); bo.SetProperties("A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); List <ApiCountryRegionResponseModel> response = mapper.MapBOToModel(new List <BOCountryRegion>() { { bo } }); response.Count.Should().Be(1); }
public void MapEFToBO() { var mapper = new DALCountryRegionMapper(); CountryRegion entity = new CountryRegion(); entity.SetProperties("A", DateTime.Parse("1/1/1987 12:00:00 AM"), "A"); BOCountryRegion response = mapper.MapEFToBO(entity); response.CountryRegionCode.Should().Be("A"); response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM")); response.Name.Should().Be("A"); }