public void MapResponseToRequest() { var mapper = new ApiVProductAndDescriptionModelMapper(); var model = new ApiVProductAndDescriptionResponseModel(); model.SetProperties("A", "A", "A", 1, "A"); ApiVProductAndDescriptionRequestModel response = mapper.MapResponseToRequest(model); response.Description.Should().Be("A"); response.Name.Should().Be("A"); response.ProductID.Should().Be(1); response.ProductModel.Should().Be("A"); }
public void CreatePatch() { var mapper = new ApiVProductAndDescriptionModelMapper(); var model = new ApiVProductAndDescriptionRequestModel(); model.SetProperties("A", "A", 1, "A"); JsonPatchDocument <ApiVProductAndDescriptionRequestModel> patch = mapper.CreatePatch(model); var response = new ApiVProductAndDescriptionRequestModel(); patch.ApplyTo(response); response.Description.Should().Be("A"); response.Name.Should().Be("A"); response.ProductID.Should().Be(1); response.ProductModel.Should().Be("A"); }