Пример #1
0
        public void All_ShouldCall_All_From_Repository()
        {
            _mock.Setup(repository => repository.GetAll()).Returns(new List <NetworkMetric>());

            var result = _controller.GetAll();

            _mock.Verify(repository => repository.GetAll(), Times.AtMostOnce());
        }
Пример #2
0
        public void GetAll_ShouldCall_Create_From_Repository()
        {
            mock.Setup(repository => repository.GetAll()).Returns(new List <NetworkMetric>());

            var result = controller.GetAll();

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

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