public void Jukebox_Should_Throw_PlayAllSongs_If_No_CD() { //arrange var jukebox = new Jukebox(); //act Action act = () => jukebox.PlayAllSongs(); //assert act.ShouldThrow <InvalidOperationException>(); }
public void Jukebox_Should_Play_All_Songs_With_Skip() { //arrange var artist = new Artist(1, String.Empty); var songs = new List <Song>() { new Song(1, string.Empty, 4, null), new Song(2, string.Empty, 3, artist), new Song(3, string.Empty, 2, null), new Song(4, string.Empty, 1, artist) }; var jukebox = new Jukebox(); jukebox.InsertCD(new CD(songs)); jukebox.IncreaseBalance(new Coin(2)); //act jukebox.PlayAllSongs(); //assert jukebox.Balance.ShouldBeEquivalentTo(0); }