public void GetOriginalsongsByLyricsTest() { var options = new DbContextOptionsBuilder <ApplicationDbContext>() .UseInMemoryDatabase(databaseName: "InHarmonyTestControllerDB") .Options; using (var context = new ApplicationDbContext(options)) { context.Database.EnsureDeleted(); context.Database.EnsureCreated(); Repository repository = new Repository(context, _repositoryLogger); BusinessLogicClass logic = new BusinessLogicClass(repository, _mapperClass, _repositoryLogger); SongController songController = new SongController(logic, _songControllerLogger); // create a song var song = new Song { Lyrics = "thicc dummy data" }; repository.songs.Add(song); context.SaveChanges(); var s = songController.GetOriginalsongsByLyrics(song.Lyrics); Assert.NotEmpty(s.Result); } }