public void GetTownByNameShouldReturnNull() { var options = new DbContextOptionsBuilder <FooteoDbContext>() .UseInMemoryDatabase(databaseName: "GetTownByName_Towns_DB") .Options; var dbContext = new FooteoDbContext(options); var townsService = new TownsService(dbContext); townsService.CreateTown("Sofia"); var town = townsService.GetTownByName <Town>("Burgas"); Assert.Null(town); }