public async void should_return_collection_of_pathway_when_parameter_is_false() { //Arrange IEnumerable<Pathway> pathwayList = new List<Pathway>(); _pathwayRepository.Setup(x => x.GetAllPathways()).Returns(Task.FromResult(pathwayList)); var sut = new PathwayController(_pathwayRepository.Object); //Act var result = await sut.GetPathways(false); //Assert _pathwayRepository.Verify(x => x.GetGroupedPathways(), Times.Never); _pathwayRepository.Verify(x => x.GetAllPathways(), Times.Once); Assert.That(result.StatusCode, Is.EqualTo(HttpStatusCode.OK)); }
public void SetUp() { _pathwayRepository = new Mock<IPathwayRepository>(); _sut = new PathwayController(_pathwayRepository.Object); }