public virtual ApiStateProvinceResponseModel MapBOToModel(
            BOStateProvince boStateProvince)
        {
            var model = new ApiStateProvinceResponseModel();

            model.SetProperties(boStateProvince.StateProvinceID, boStateProvince.CountryRegionCode, boStateProvince.IsOnlyStateProvinceFlag, boStateProvince.ModifiedDate, boStateProvince.Name, boStateProvince.Rowguid, boStateProvince.StateProvinceCode, boStateProvince.TerritoryID);

            return(model);
        }
Exemple #2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiStateProvinceModelMapper();
            var model  = new ApiStateProvinceResponseModel();

            model.SetProperties(1, "A", true, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A", 1);
            ApiStateProvinceRequestModel response = mapper.MapResponseToRequest(model);

            response.CountryRegionCode.Should().Be("A");
            response.IsOnlyStateProvinceFlag.Should().Be(true);
            response.ModifiedDate.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Name.Should().Be("A");
            response.Rowguid.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.StateProvinceCode.Should().Be("A");
            response.TerritoryID.Should().Be(1);
        }