Esempio n. 1
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiExtensionConfigurationModelMapper();
            var model  = new ApiExtensionConfigurationResponseModel();

            model.SetProperties("A", "A", "A", "A");
            ApiExtensionConfigurationRequestModel response = mapper.MapResponseToRequest(model);

            response.ExtensionAuthor.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
        }
        public async void TestUpdate()
        {
            var model = await this.CreateRecord();

            ApiExtensionConfigurationModelMapper mapper = new ApiExtensionConfigurationModelMapper();

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

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

            await this.Cleanup();
        }