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

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

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

            ApiPipelineStepNoteModelMapper mapper = new ApiPipelineStepNoteModelMapper();

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

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

            await this.Cleanup();
        }
Exemplo n.º 3
0
        public async void TestUpdate()
        {
            var builder = new WebHostBuilder()
                          .UseEnvironment("Production")
                          .UseStartup <TestStartup>();
            TestServer testServer = new TestServer(builder);

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

            ApiPipelineStepNoteResponseModel model = await client.PipelineStepNoteGetAsync(1);

            ApiPipelineStepNoteModelMapper mapper = new ApiPipelineStepNoteModelMapper();

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

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