public void GetAll_ShouldCall_Create_From_Repository() { mock.Setup(repository => repository.GetAll()).Returns(new List <RamMetric>()); var result = controller.GetAll(); mock.Verify(repository => repository.GetAll()); }
public void All_ShouldCall_All_From_Repository() { _mock.Setup(repository => repository.GetAll()).Returns(new List <RamMetric>()); var result = _controller.GetAll(); _mock.Verify(repository => repository.GetAll(), Times.AtMostOnce()); }
public void GetAll_ReturnsOk() { var result = _controller.GetAll(); _ = Assert.IsAssignableFrom <IActionResult>(result); }