public void GetCommandItems_ReturnsZeroItems_WhenDBIsEmpty()
        {
            mockRepo.Setup(repo => repo.GetAllCommands()).Returns(GetCommands(0));

            var controller = new CommandsController(mockRepo.Object, mapper);

            var result = controller.GetAllComands();

            Assert.IsType <OkObjectResult>(result.Result);
        }
        public void GetAllComands_ReturnsOneItem_WhenDBHasOneResource()
        {
            //Arrange
            mockRepo.Setup(repo => repo.GetAllCommands()).Returns(GetCommands(1));
            var controller = new CommandsController(mockRepo.Object, mapper);

            //Act
            var result = controller.GetAllComands();

            //Assert
            var okResult = result.Result as OkObjectResult;
            var commands = okResult.Value as List <CommandReadDto>;

            Assert.Single(commands);
        }