public void GetStreetsReturnsListOfStreets() { //Arrange var moq = new Mock <ICityRepository>(); moq.Setup(m => m.GetStreets(It.IsAny <int>())).Returns(Task.FromResult(new List <Street>() as IEnumerable <Street>)); CitiesController controller = new CitiesController(moq.Object); //Act var result = controller.GetStreets(3).Result; //Assert Assert.IsInstanceOfType(result, typeof(IEnumerable <Street>)); }