public async Task DoesReviewIdExistShouldReturnFalseIfNotFound() { var options = new DbContextOptionsBuilder <AlexandriaDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; var db = new AlexandriaDbContext(options); await db.AddRangeAsync( new Review { Description = "description1", AuthorId = "author1", BookId = 1, }, new Review { Description = "description2", AuthorId = "author1", BookId = 1, ParentId = 1, }); await db.SaveChangesAsync(); var reviewsService = new ReviewsService(db); var result = await reviewsService.DoesReviewIdExistAsync(5); Assert.False(result); }