public void MapModelToBO() { var mapper = new BOLPostTypesMapper(); ApiPostTypesRequestModel model = new ApiPostTypesRequestModel(); model.SetProperties("A"); BOPostTypes response = mapper.MapModelToBO(1, model); response.Type.Should().Be("A"); }
private async Task <ApiPostTypesResponseModel> CreateRecord() { var model = new ApiPostTypesRequestModel(); model.SetProperties("B"); CreateResponse <ApiPostTypesResponseModel> result = await this.Client.PostTypesCreateAsync(model); result.Success.Should().BeTrue(); return(result.Record); }
public void MapRequestToResponse() { var mapper = new ApiPostTypesModelMapper(); var model = new ApiPostTypesRequestModel(); model.SetProperties("A"); ApiPostTypesResponseModel response = mapper.MapRequestToResponse(1, model); response.Id.Should().Be(1); response.Type.Should().Be("A"); }
public void CreatePatch() { var mapper = new ApiPostTypesModelMapper(); var model = new ApiPostTypesRequestModel(); model.SetProperties("A"); JsonPatchDocument <ApiPostTypesRequestModel> patch = mapper.CreatePatch(model); var response = new ApiPostTypesRequestModel(); patch.ApplyTo(response); response.Type.Should().Be("A"); }