public void All_ShouldCall_All_From_Repository()
        {
            _mock.Setup(repository => repository.GetAll()).Returns(new List <DotNetMetric>());

            var result = _controller.GetAll();

            _mock.Verify(repository => repository.GetAll(), Times.AtMostOnce());
        }
Exemple #2
0
        public void GetAll_ShouldCall_Create_From_Repository()
        {
            mock.Setup(repository => repository.GetAll()).Returns(new List <DotNetMetric>());

            var result = controller.GetAll();

            mock.Verify(repository => repository.GetAll());
        }
        public void GetAll_ReturnsOk()
        {
            var result = _controller.GetAll();

            _ = Assert.IsAssignableFrom <IActionResult>(result);
        }