public void MapResponseToRequest() { var mapper = new ApiMachineRefTeamModelMapper(); var model = new ApiMachineRefTeamResponseModel(); model.SetProperties(1, 1, 1); ApiMachineRefTeamRequestModel response = mapper.MapResponseToRequest(model); response.MachineId.Should().Be(1); response.TeamId.Should().Be(1); }
public async void TestUpdate() { var model = await this.CreateRecord(); ApiMachineRefTeamModelMapper mapper = new ApiMachineRefTeamModelMapper(); UpdateResponse <ApiMachineRefTeamResponseModel> updateResponse = await this.Client.MachineRefTeamUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); await this.Cleanup(); }
public void CreatePatch() { var mapper = new ApiMachineRefTeamModelMapper(); var model = new ApiMachineRefTeamRequestModel(); model.SetProperties(1, 1); JsonPatchDocument <ApiMachineRefTeamRequestModel> patch = mapper.CreatePatch(model); var response = new ApiMachineRefTeamRequestModel(); patch.ApplyTo(response); response.MachineId.Should().Be(1); response.TeamId.Should().Be(1); }