public void MapResponseToRequest()
        {
            var mapper = new ApiApiKeyModelMapper();
            var model  = new ApiApiKeyResponseModel();

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

            response.ApiKeyHashed.Should().Be("A");
            response.Created.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM"));
            response.JSON.Should().Be("A");
            response.UserId.Should().Be("A");
        }
        public async void TestUpdate()
        {
            var model = await this.CreateRecord();

            ApiApiKeyModelMapper mapper = new ApiApiKeyModelMapper();

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

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

            await this.Cleanup();
        }
        public void CreatePatch()
        {
            var mapper = new ApiApiKeyModelMapper();
            var model  = new ApiApiKeyRequestModel();

            model.SetProperties("A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A");

            JsonPatchDocument <ApiApiKeyRequestModel> patch = mapper.CreatePatch(model);
            var response = new ApiApiKeyRequestModel();

            patch.ApplyTo(response);
            response.ApiKeyHashed.Should().Be("A");
            response.Created.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM"));
            response.JSON.Should().Be("A");
            response.UserId.Should().Be("A");
        }