private async Task <ApiFeedResponseModel> CreateRecord() { var model = new ApiFeedRequestModel(); model.SetProperties("B", "B", "B", "B"); CreateResponse <ApiFeedResponseModel> result = await this.Client.FeedCreateAsync(model); result.Success.Should().BeTrue(); return(result.Record); }
public void MapModelToBO() { var mapper = new BOLFeedMapper(); ApiFeedRequestModel model = new ApiFeedRequestModel(); model.SetProperties("A", "A", "A", "A"); BOFeed response = mapper.MapModelToBO("A", model); response.FeedType.Should().Be("A"); response.FeedUri.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }
public void MapRequestToResponse() { var mapper = new ApiFeedModelMapper(); var model = new ApiFeedRequestModel(); model.SetProperties("A", "A", "A", "A"); ApiFeedResponseModel response = mapper.MapRequestToResponse("A", model); response.FeedType.Should().Be("A"); response.FeedUri.Should().Be("A"); response.Id.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }
public void CreatePatch() { var mapper = new ApiFeedModelMapper(); var model = new ApiFeedRequestModel(); model.SetProperties("A", "A", "A", "A"); JsonPatchDocument <ApiFeedRequestModel> patch = mapper.CreatePatch(model); var response = new ApiFeedRequestModel(); patch.ApplyTo(response); response.FeedType.Should().Be("A"); response.FeedUri.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }