Beispiel #1
0
        public async Task DeleteMovieFromFolder_MovieDeleted()
        {
            var db      = CreateAndSeedDb();
            var service = new FolderService(db);

            await service.DeleteMovieFromFolderAsync("895973FB-F8E1-4FD6-89C4-DC13CED4780E", 1, 1);

            Assert.DoesNotContain(db.MovieFolders, folder => folder.FolderId == 1);
        }
Beispiel #2
0
        public async Task DeleteMovieFromFolder_MovieIsNotInFolder_ThrownException()
        {
            var db      = CreateAndSeedDb();
            var service = new FolderService(db);

            await Assert.ThrowsAsync <BadRequestException>(async() =>
            {
                await service.DeleteMovieFromFolderAsync("895973FB-F8E1-4FD6-89C4-DC13CED4780E", 1, 2);
            });
        }