Exemple #1
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiCommunityActionTemplateModelMapper();
            var model  = new ApiCommunityActionTemplateResponseModel();

            model.SetProperties("A", Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"), "A", "A");
            ApiCommunityActionTemplateRequestModel response = mapper.MapResponseToRequest(model);

            response.ExternalId.Should().Be(Guid.Parse("8420cdcf-d595-ef65-66e7-dff9f98764da"));
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }
        public async void TestUpdate()
        {
            var model = await this.CreateRecord();

            ApiCommunityActionTemplateModelMapper mapper = new ApiCommunityActionTemplateModelMapper();

            UpdateResponse <ApiCommunityActionTemplateResponseModel> updateResponse = await this.Client.CommunityActionTemplateUpdateAsync(model.Id, mapper.MapResponseToRequest(model));

            updateResponse.Record.Should().NotBeNull();
            updateResponse.Success.Should().BeTrue();

            await this.Cleanup();
        }