//private ApplicationDbContext _db = new ApplicationDbContext(); // GET: Podcast public ActionResult Index() { var userID = User.Identity.GetUserId(); var service = new PodcastService(userID); var model = service.GetPodcasts(); return(View(model)); }
public void ShouldGetPodcasts() { // Given var context = new Context <PodcastService>(); PodcastService sut = context.CreateSut(); // When IReadOnlyCollection <PodcastModel> podcasts = sut.GetPodcasts(); // Then podcasts.Should().HaveCount(2); }
public void HaveTenPodcasts() { // arrange // sut already done in constructor // act var podcasts = _sut.GetPodcasts(); var count = podcasts.Count(); // assert Assert.NotEmpty(podcasts); Assert.Equal(10, count); }