private async Task <ApiMachineRefTeamResponseModel> CreateRecord() { var model = new ApiMachineRefTeamRequestModel(); model.SetProperties(1, 1); CreateResponse <ApiMachineRefTeamResponseModel> result = await this.Client.MachineRefTeamCreateAsync(model); result.Success.Should().BeTrue(); return(result.Record); }
public void MapModelToBO() { var mapper = new BOLMachineRefTeamMapper(); ApiMachineRefTeamRequestModel model = new ApiMachineRefTeamRequestModel(); model.SetProperties(1, 1); BOMachineRefTeam response = mapper.MapModelToBO(1, model); response.MachineId.Should().Be(1); response.TeamId.Should().Be(1); }
public void MapRequestToResponse() { var mapper = new ApiMachineRefTeamModelMapper(); var model = new ApiMachineRefTeamRequestModel(); model.SetProperties(1, 1); ApiMachineRefTeamResponseModel response = mapper.MapRequestToResponse(1, model); response.Id.Should().Be(1); response.MachineId.Should().Be(1); response.TeamId.Should().Be(1); }
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); }