Exemple #1
0
        public async Task GetPlayListByIDAsyncShouldReturnPlayList()
        {
            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 foundPlayList = await _repo.GetPlayListByIDAsync(4);

                Assert.NotNull(foundPlayList);
                Assert.Equal(4, foundPlayList.Id);
            }
        }