public override void Initialize() { base.Initialize(); IScoreBoard scoreBoard = new ScoreBoard(); IScoreBoardService scoreBoardService = new ScoreBoardService(scoreBoard); IRenderer renderer = new WpfRenderer(new AllCapsFormatter(), new WpfWriter()); IPlayer player = new Player(); IWordProvider wordProvider = new WordProvider(); IWordGenerator randomWordGenerator = new WordGenerator(wordProvider); ICommandFactory commandFactory = new CommandFactory(); IEngine gameEngine = new WpfEngine(scoreBoardService, renderer, player, randomWordGenerator, commandFactory); this.Engine = gameEngine; }
public void Init() { this.player = new Mock<IPlayer>(); this.guessWord = new Mock<IGuessWord>(); this.wordGenerator = new Mock<IWordGenerator>(); this.inputProvider = new Mock<IInputProvider>(); this.engine = new WpfEngine( new Mock<IScoreBoardService>().Object, new Mock<IRenderer>().Object, this.player.Object, this.wordGenerator.Object, new Mock<ICommandFactory>().Object); }
public void CleanUp() { this.engine = null; this.player = null; this.guessWord = null; }