public async Task ByIdAsyncShouldRerutnCorectEntity() { //Arrange var dbOptions = new DbContextOptionsBuilder <UndergroundStationDbContext>() .UseInMemoryDatabase("UndergroundStationTestDb") .Options; var db = new UndergroundStationDbContext(dbOptions); var newsService = new NewsService(db); //Act var result = newsService.ByIdAsync(1); //Assert result.Id .Should() .Equals(1); }