private async Task <ApiTagSetResponseModel> CreateRecord() { var model = new ApiTagSetRequestModel(); model.SetProperties(BitConverter.GetBytes(2), "B", "B", 2); CreateResponse <ApiTagSetResponseModel> result = await this.Client.TagSetCreateAsync(model); result.Success.Should().BeTrue(); return(result.Record); }
public void MapModelToBO() { var mapper = new BOLTagSetMapper(); ApiTagSetRequestModel model = new ApiTagSetRequestModel(); model.SetProperties(BitConverter.GetBytes(1), "A", "A", 1); BOTagSet response = mapper.MapModelToBO("A", model); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }
public void CreatePatch() { var mapper = new ApiTagSetModelMapper(); var model = new ApiTagSetRequestModel(); model.SetProperties(BitConverter.GetBytes(1), "A", "A", 1); JsonPatchDocument <ApiTagSetRequestModel> patch = mapper.CreatePatch(model); var response = new ApiTagSetRequestModel(); patch.ApplyTo(response); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.SortOrder.Should().Be(1); }