Ejemplo n.º 1
0
        public async void TestGet()
        {
            var builder = new WebHostBuilder()
                          .UseEnvironment("Production")
                          .UseStartup <TestStartup>();
            TestServer testServer = new TestServer(builder);

            var client = new ApiClient(testServer.CreateClient());
            ApiAWBuildVersionResponseModel response = await client.AWBuildVersionGetAsync(1);

            response.Should().NotBeNull();
        }
Ejemplo n.º 2
0
        public async void TestUpdate()
        {
            var builder = new WebHostBuilder()
                          .UseEnvironment("Production")
                          .UseStartup <TestStartup>();
            TestServer testServer = new TestServer(builder);

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

            ApiAWBuildVersionResponseModel model = await client.AWBuildVersionGetAsync(1);

            ApiAWBuildVersionModelMapper mapper = new ApiAWBuildVersionModelMapper();

            UpdateResponse <ApiAWBuildVersionResponseModel> updateResponse = await client.AWBuildVersionUpdateAsync(model.SystemInformationID, mapper.MapResponseToRequest(model));

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