public static void ANewlyInstalledGameShouldAppearInTheListOfInstalledGames() { GameConsole console = new GenericGameConsole(); var superman64 = new Game { Title = "Superman 64" }; var shadowOfTheColossus = new Game { Title = "Shadow of the Colossus" }; var me2 = new Game { Title = "Mass Effect 2" }; var games = new ArrayList <Game> { superman64, shadowOfTheColossus, me2 }; foreach (var game in games) { console.InstallGame(game); } Assert.True(console.InstalledGames.Contains(superman64)); Assert.True(console.InstalledGames.Contains(shadowOfTheColossus)); Assert.True(console.InstalledGames.Contains(me2)); }
public static void TheGamePlayedShouldBeTheCurrentGame() { var console = new GenericGameConsole(); var me2 = new Game { Title = "Mass Effect 2" }; console.InstallGame(me2); console.Play(me2); console.CurrentGame.Should().Be(me2); }
public static void AGameCanNotBePlayedIfItWasUninstalled() { var console = new GenericGameConsole(); var me2 = new Game { Title = "Mass Effect 2" }; console.InstallGame(me2); console.Play(me2); console.UninstallGame(me2); Assert.Null(console.CurrentGame); }
public static void QuitCurrentGameShouldSetTheCurrentGameToNull() { var console = new GenericGameConsole(); var me2 = new Game { Title = "Mass Effect 2" }; console.InstallGame(me2); console.Play(me2); console.QuitCurrentGame(); Assert.Null(console.CurrentGame); }