Exemplo n.º 1
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiPostTypesModelMapper();
            var model  = new ApiPostTypesResponseModel();

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

            response.Type.Should().Be("A");
        }
Exemplo n.º 2
0
        public async void TestUpdate()
        {
            var model = await this.CreateRecord();

            ApiPostTypesModelMapper mapper = new ApiPostTypesModelMapper();

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

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

            await this.Cleanup();
        }