test_class.file: chapter-code/chapter5/TestGameModel.java
test_class.identifier: TestGameModel
test_case.body: @Test
  	public void testTryToAutoPlay()
  	{
  		try
  		{
  			Field strategyField = GameModel.class.getDeclaredField("aPlayingStrategy");
  			strategyField.setAccessible(true);
  			StubStrategy strategy = new StubStrategy();
  			GameModel model = GameModel.instance();
  			strategyField.set(model, strategy);
  			model.tryToAutoPlay();
  			assertTrue(strategy.hasExecuted());
  		}
  		catch( ReflectiveOperationException e )
  		{
  			fail();
  		}
  	}
test_case.class_method_signature: TestGameModel.testTryToAutoPlay()
test_case.full_signature: @Test public void testTryToAutoPlay()
test_case.identifier: testTryToAutoPlay
test_case.invocations: getDeclaredField setAccessible instance set tryToAutoPlay assertTrue hasExecuted fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testTryToAutoPlay()
focal_class.declarator: INSTANCE = new GameModel()
focal_class.modifier: private static
focal_class.original_string: private static GameModel INSTANCE = new GameModel();
focal_class.type: GameModel
focal_class.var_name: INSTANCE
focal_class.declarator: aPlayingStrategy
focal_class.modifier: private
focal_class.original_string: private PlayingStrategy aPlayingStrategy;
focal_class.type: PlayingStrategy
focal_class.var_name: aPlayingStrategy
focal_class.file: chapter-code/chapter5/GameModel.java
focal_class.identifier: GameModel
focal_class.interfaces: implements GameModelView
focal_class.class_method_signature: GameModel.instance()
focal_class.full_signature: public static GameModel instance()
focal_class.identifier: instance
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: GameModel
focal_class.signature: GameModel instance()
focal_class.class_method_signature: GameModel.tryToAutoPlay()
focal_class.full_signature: public void tryToAutoPlay()
focal_class.identifier: tryToAutoPlay
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void tryToAutoPlay()
focal_method.body: public void tryToAutoPlay()
  	{
  		aPlayingStrategy.computeNextMove(this);
  	}
focal_method.class_method_signature: GameModel.tryToAutoPlay()
focal_method.full_signature: public void tryToAutoPlay()
focal_method.identifier: tryToAutoPlay
focal_method.invocations: computeNextMove
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: void
focal_method.signature: void tryToAutoPlay()