public void ShouldSetChosenPokemonAsCurrent() { ITrainer trainer = TrainerFactory.CreateTrainer <Blue>(); trainer?.PokemonTeam?.FirstOrDefault()?.SetAsCurrent(); Assert.True(trainer.PokemonTeam?.FirstOrDefault()?.Current); }
public void TrainerShouldNotHaveAnyPokemonLeftToBattle() { ITrainer trainer = TrainerFactory.CreateTrainer <Player>(); trainer?.PokemonTeam?.ForEach(pkmn => pkmn?.SetAsFainted()); Assert.False(trainer?.HasAvailablePokemon()); }
public void PlayerShouldNotHaveDialogues() { ITrainer player = TrainerFactory.CreateTrainer <Player>(); Assert.Throws <NotImplementedException>(() => player?.ShowTrainerDialogue()); Assert.Throws <NotImplementedException>(() => player?.ShowFinalDialogueForLoss()); Assert.Throws <NotImplementedException>(() => player?.ShowFinalDialogueForVictory()); }
static void Main() { try { ITrainer player = TrainerFactory.CreateTrainer <Player>(); var mainStory = new MainStory(player); mainStory.BeginStory(); } catch (Exception ex) { Console.WriteLine($"Something bad happened in the game! Please report the error. Error: {ex.Message} \n Error's StackTrace: {ex.StackTrace}"); } }
public void TrainerRedCreationShouldNotReturnNull() => Assert.NotNull(TrainerFactory.CreateTrainer <Red>());
public void TrainerLanceCreationShouldNotReturnNull() => Assert.NotNull(TrainerFactory.CreateTrainer <Lance>());
public void TrainerMaryAnnCreationShouldNotReturnNull() => Assert.NotNull(TrainerFactory.CreateTrainer <MaryAnn>());
public void TrainerBrunoCreationShouldNotReturnNull() => Assert.NotNull(TrainerFactory.CreateTrainer <Bruno>());
public void TrainerPlayerCreationShouldNotReturnNull() => Assert.NotNull(TrainerFactory.CreateTrainer <Player>());
public void EnemyTrainerShouldNotHaveAnyItems() { ITrainer brock = TrainerFactory.CreateTrainer <Brock>(); Assert.True(brock?.Items == null); }