public void ShouldRegisterTicketCategory()
        {
            RegisterTicketCategoryCommand command = new RegisterTicketCategoryCommand()
            {
                Name = "Problemas de na criação de ordens"
            };

            appService.Register(command);

            Assert.AreEqual(1, appService.GetAllCategories().Count());
        }
Example #2
0
        public void Register(RegisterTicketCategoryCommand command)
        {
            command.Validate();

            if (AddNotifications(command))
            {
                return;
            }

            TicketCategory ticketCategory = new TicketCategory(command.Name);

            _repository.Register(ticketCategory);

            Commit();
        }
Example #3
0
        //[Authorize(Roles = "SupportAccount,AdminAccount")]
        public IActionResult Register([FromBody] RegisterTicketCategoryCommand command)
        {
            _ticketCategoryApplicationService.Register(command);

            return(CreateResponse());
        }