@Test public void testNameProperty() throws Exception { GameScene theScene = mock(GameScene.class); GameRuntime theRuntime = mock(GameRuntime.class); GameEventManager theManager = mock(GameEventManager.class); when(theScene.getRuntime()).thenReturn(theRuntime); when(theRuntime.getEventManager()).thenReturn(theManager); EventSheet theSheet = new EventSheet(theScene); assertEquals(EventSheet.NAME_PROPERTY, theSheet.nameProperty().getName()); assertSame(theSheet, theSheet.nameProperty().getOwner()); assertEquals(String.class, theSheet.nameProperty().getType()); assertEquals(1, theSheet.nameProperty().getChangeListener().size()); assertTrue(theSheet.nameProperty().getChangeListener().contains(theManager)); }
public Property<String> nameProperty() { return nameProperty; }
EventSheet { public Property<String> nameProperty() { return nameProperty; } }
EventSheet { public Property<String> nameProperty() { return nameProperty; } EventSheet(GameScene aGameScene); }
EventSheet { public Property<String> nameProperty() { return nameProperty; } EventSheet(GameScene aGameScene); GameScene getGameScene(); Property<String> nameProperty(); GameRule[] getRules(); Map<String, Object> serialize(); static EventSheet unmarshall(IORegistry aIORegistry, GameScene aGameScene, Map<String, Object> aSerializedData); void addRule(GameRule aNewRule); void removeRule(GameRule aGameRule); }
EventSheet { public Property<String> nameProperty() { return nameProperty; } EventSheet(GameScene aGameScene); GameScene getGameScene(); Property<String> nameProperty(); GameRule[] getRules(); Map<String, Object> serialize(); static EventSheet unmarshall(IORegistry aIORegistry, GameScene aGameScene, Map<String, Object> aSerializedData); void addRule(GameRule aNewRule); void removeRule(GameRule aGameRule); static final String NAME_PROPERTY; }