public void MapResponseToRequest()
        {
            var mapper = new ApiCountryRequirementModelMapper();
            var model  = new ApiCountryRequirementResponseModel();

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

            response.CountryId.Should().Be(1);
            response.Details.Should().Be("A");
        }
        public async void TestUpdate()
        {
            var model = await this.CreateRecord();

            ApiCountryRequirementModelMapper mapper = new ApiCountryRequirementModelMapper();

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

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

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

            model.SetProperties(1, "A");

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

            patch.ApplyTo(response);
            response.CountryId.Should().Be(1);
            response.Details.Should().Be("A");
        }
        public async void TestUpdate()
        {
            var builder = new WebHostBuilder()
                          .UseEnvironment("Production")
                          .UseStartup <TestStartup>();
            TestServer testServer = new TestServer(builder);

            var client = new ApiClient(testServer.CreateClient());

            ApiCountryRequirementResponseModel model = await client.CountryRequirementGetAsync(1);

            ApiCountryRequirementModelMapper mapper = new ApiCountryRequirementModelMapper();

            UpdateResponse <ApiCountryRequirementResponseModel> updateResponse = await client.CountryRequirementUpdateAsync(model.Id, mapper.MapResponseToRequest(model));

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