Пример #1
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiAccountModelMapper();
            var model  = new ApiAccountResponseModel();

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

            response.AccountType.Should().Be("A");
            response.EnvironmentIds.Should().Be("A");
            response.JSON.Should().Be("A");
            response.Name.Should().Be("A");
            response.TenantIds.Should().Be("A");
            response.TenantTags.Should().Be("A");
        }
Пример #2
0
        public async void TestUpdate()
        {
            var model = await this.CreateRecord();

            ApiAccountModelMapper mapper = new ApiAccountModelMapper();

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

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

            await this.Cleanup();
        }