Ejemplo n.º 1
0
        public void MapModelToBO()
        {
            var mapper = new BOLTicketStatusMapper();
            ApiTicketStatusRequestModel model = new ApiTicketStatusRequestModel();

            model.SetProperties("A");
            BOTicketStatus response = mapper.MapModelToBO(1, model);

            response.Name.Should().Be("A");
        }
Ejemplo n.º 2
0
        private async Task <ApiTicketStatusResponseModel> CreateRecord()
        {
            var model = new ApiTicketStatusRequestModel();

            model.SetProperties("B");
            CreateResponse <ApiTicketStatusResponseModel> result = await this.Client.TicketStatusCreateAsync(model);

            result.Success.Should().BeTrue();
            return(result.Record);
        }
Ejemplo n.º 3
0
        public void MapRequestToResponse()
        {
            var mapper = new ApiTicketStatusModelMapper();
            var model  = new ApiTicketStatusRequestModel();

            model.SetProperties("A");
            ApiTicketStatusResponseModel response = mapper.MapRequestToResponse(1, model);

            response.Id.Should().Be(1);
            response.Name.Should().Be("A");
        }
Ejemplo n.º 4
0
        public void CreatePatch()
        {
            var mapper = new ApiTicketStatusModelMapper();
            var model  = new ApiTicketStatusRequestModel();

            model.SetProperties("A");

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

            patch.ApplyTo(response);
            response.Name.Should().Be("A");
        }