public void Initalize() { _frame = new Frame(null); _game = new Game(new Frame[] { _frame }); _gameFactory = Mock.Of<GameFactory>(factory => factory.Create() == _game); //TODO !!! method must be virtual to be able to mock (or should mock an interface!?) }
public Program(GameFactory gameFactory) { _game = gameFactory.Create(); }