private async Task <ApiChannelResponseModel> CreateRecord() { var model = new ApiChannelRequestModel(); model.SetProperties(BitConverter.GetBytes(2), "B", "B", "B", "B", "B"); CreateResponse <ApiChannelResponseModel> result = await this.Client.ChannelCreateAsync(model); result.Success.Should().BeTrue(); return(result.Record); }
public void MapModelToBO() { var mapper = new BOLChannelMapper(); ApiChannelRequestModel model = new ApiChannelRequestModel(); model.SetProperties(BitConverter.GetBytes(1), "A", "A", "A", "A", "A"); BOChannel response = mapper.MapModelToBO("A", model); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.JSON.Should().Be("A"); response.LifecycleId.Should().Be("A"); response.Name.Should().Be("A"); response.ProjectId.Should().Be("A"); response.TenantTags.Should().Be("A"); }
public void CreatePatch() { var mapper = new ApiChannelModelMapper(); var model = new ApiChannelRequestModel(); model.SetProperties(BitConverter.GetBytes(1), "A", "A", "A", "A", "A"); JsonPatchDocument <ApiChannelRequestModel> patch = mapper.CreatePatch(model); var response = new ApiChannelRequestModel(); patch.ApplyTo(response); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.JSON.Should().Be("A"); response.LifecycleId.Should().Be("A"); response.Name.Should().Be("A"); response.ProjectId.Should().Be("A"); response.TenantTags.Should().Be("A"); }