public async Task GetAllSourceLinksAsync_WithValidObject() { var links = this.Context.AnimeSourceLinks.ToList(); var result = (await this.EpisodeService.GetAllSourceLinksAsync()).ToList(); CollectionAssert.AreEqual(links, result); var link = new AnimeLinkEnum() { Name = "A different name that someone might have heard of" }; await this.Context.AnimeSourceLinks.AddAsync(link); await this.Context.SaveChangesAsync(); links = this.Context.AnimeSourceLinks.ToList(); result = (await this.EpisodeService.GetAllSourceLinksAsync()).ToList(); CollectionAssert.AreEqual(links, result); }
public async Task AddAnimeLinkEnumAsync(AnimeLinkEnum linkEnum) { await this.AnimeContext.AnimeSourceLinks.AddAsync(linkEnum); await this.AnimeContext.SaveChangesAsync(); }