public void GetRecent_ReturnsResultsFromRecentPackagesIndex() { mockLatestPackagesQuery.Setup(m => m.Get()).Returns(new [] { "a", "b", "c" }); mockRedisQuery.Setup(m => m.Get(It.IsAny <string>())).Returns <string>(s => new Package { Name = s }); var packages = controller.GetRecent(); Assert.Equal(new[] { "a", "b", "c" }, packages.Select(p => p.Name)); }