コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: TestBOLFeedMapper.cs プロジェクト: daniefer/samples
        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");
        }
コード例 #3
0
        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");
        }
コード例 #4
0
        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");
        }