Beispiel #1
0
        public async Task DeletePlayListAsyncShouldDeletePlayList()
        {
            using (var context = new MusicDBContext(options))
            {
                IMusicRepoDB _repo        = new MusicRepoDB(context);
                PlayList     testPlayList = new PlayList();
                testPlayList.Id     = 4;
                testPlayList.UserId = 1;
                testPlayList.Name   = "Songs to git gud too";
                var newPlayList = await _repo.AddPlayListAsync(testPlayList);

                var deletePlayList = await _repo.DeletePlayListAsync(testPlayList);

                using (var assertContext = new MusicDBContext(options))
                {
                    var result = assertContext.PlayList.Find(4);
                    Assert.Null(result);
                }
            }
        }