Exemplo n.º 1
0
        public void CreateNewCommand_201StatusOk_WhenValidCommandIsSubmitted()
        {
            var controller = new CommandsController(mockRepo.Object, mapper);

            var res = controller.CreateComment(new CommandCreateDto {
            });

            Assert.IsType <CreatedAtRouteResult>(res.Result);
        }
Exemplo n.º 2
0
        public void CreateNewCommand_ReturnCorrectType_WhenValidCommandIsSubmitted()
        {
            var controller = new CommandsController(mockRepo.Object, mapper);

            var res = controller.CreateComment(new CommandCreateDto {
            });

            Assert.IsType <ActionResult <CommandReadDto> >(res);
        }