public void MapResponseToRequest() { var mapper = new ApiSpaceXSpaceFeatureModelMapper(); var model = new ApiSpaceXSpaceFeatureResponseModel(); model.SetProperties(1, 1, 1); ApiSpaceXSpaceFeatureRequestModel response = mapper.MapResponseToRequest(model); response.SpaceFeatureId.Should().Be(1); response.SpaceId.Should().Be(1); }
public async void TestUpdate() { var model = await this.CreateRecord(); ApiSpaceXSpaceFeatureModelMapper mapper = new ApiSpaceXSpaceFeatureModelMapper(); UpdateResponse <ApiSpaceXSpaceFeatureResponseModel> updateResponse = await this.Client.SpaceXSpaceFeatureUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); await this.Cleanup(); }
public void CreatePatch() { var mapper = new ApiSpaceXSpaceFeatureModelMapper(); var model = new ApiSpaceXSpaceFeatureRequestModel(); model.SetProperties(1, 1); JsonPatchDocument <ApiSpaceXSpaceFeatureRequestModel> patch = mapper.CreatePatch(model); var response = new ApiSpaceXSpaceFeatureRequestModel(); patch.ApplyTo(response); response.SpaceFeatureId.Should().Be(1); response.SpaceId.Should().Be(1); }