Example #1
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiSchemaVersionsModelMapper();
            var model  = new ApiSchemaVersionsResponseModel();

            model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A");
            ApiSchemaVersionsRequestModel response = mapper.MapResponseToRequest(model);

            response.Applied.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.ScriptName.Should().Be("A");
        }
Example #2
0
        public async void TestUpdate()
        {
            var model = await this.CreateRecord();

            ApiSchemaVersionsModelMapper mapper = new ApiSchemaVersionsModelMapper();

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

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

            await this.Cleanup();
        }