private async Task <ApiWorkerPoolResponseModel> CreateRecord() { var model = new ApiWorkerPoolRequestModel(); model.SetProperties(true, "B", "B", 2); CreateResponse <ApiWorkerPoolResponseModel> result = await this.Client.WorkerPoolCreateAsync(model); result.Success.Should().BeTrue(); return(result.Record); }
public void MapModelToBO() { var mapper = new BOLWorkerPoolMapper(); ApiWorkerPoolRequestModel model = new ApiWorkerPoolRequestModel(); model.SetProperties(true, "A", "A", 1); BOWorkerPool response = mapper.MapModelToBO("A", model); response.IsDefault.Should().Be(true); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }
public void CreatePatch() { var mapper = new ApiWorkerPoolModelMapper(); var model = new ApiWorkerPoolRequestModel(); model.SetProperties(true, "A", "A", 1); JsonPatchDocument <ApiWorkerPoolRequestModel> patch = mapper.CreatePatch(model); var response = new ApiWorkerPoolRequestModel(); patch.ApplyTo(response); response.IsDefault.Should().Be(true); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }