@Test public void testSizeProperty() throws Exception { GameEventManager theEventManager = mock(GameEventManager.class); GameRuntime theRuntime = mock(GameRuntime.class); when(theRuntime.getEventManager()).thenReturn(theEventManager); GameScene theScene = mock(GameScene.class); when(theScene.getRuntime()).thenReturn(theRuntime); GameObject theObject = new GameObject(theScene, "Test"); assertEquals(new Size(64, 64), theObject.sizeProperty().get()); assertEquals(GameObject.SIZE_PROPERTY, theObject.sizeProperty().getName()); assertEquals(theObject, theObject.sizeProperty().getOwner()); assertEquals(Size.class, theObject.sizeProperty().getType()); theObject.sizeProperty().set(new Size(128, 128)); verify(theEventManager).handleGameEvent(any(PropertyChanged.class)); }
@ReflectiveField public Property<Size> sizeProperty() { return size; }
GameObject implements Reflectable<GameObjectClassInformation> { @ReflectiveField public Property<Size> sizeProperty() { return size; } }
GameObject implements Reflectable<GameObjectClassInformation> { @ReflectiveField public Property<Size> sizeProperty() { return size; } GameObject(GameScene aScene, String aName);   GameObject(GameScene aScene, String aName, String aUUID); }
GameObject implements Reflectable<GameObjectClassInformation> { @ReflectiveField public Property<Size> sizeProperty() { return size; } GameObject(GameScene aScene, String aName);   GameObject(GameScene aScene, String aName, String aUUID); GameScene getGameScene(); @ReflectiveField Property<String> uuidProperty(); @ReflectiveField Property<String> nameProperty(); @ReflectiveField Property<Size> sizeProperty(); @ReflectiveField Property<Boolean> visibleProperty(); @Override boolean equals(Object o); @Override int hashCode(); void add(BehaviorTemplate aBehaviorTemplate); void remove(BehaviorTemplate aBehaviorTemplate); T getBehaviorTemplate(BehaviorType aType); @Override GameObjectClassInformation getClassInformation(); Set<BehaviorTemplate> getBehaviorTemplates(); Map<String, Object> serialize(); static GameObject deserialize(GameRuntime aGameRuntime, GameScene aGameScene, Map<String, Object> theSerializedData); }
GameObject implements Reflectable<GameObjectClassInformation> { @ReflectiveField public Property<Size> sizeProperty() { return size; } GameObject(GameScene aScene, String aName);   GameObject(GameScene aScene, String aName, String aUUID); GameScene getGameScene(); @ReflectiveField Property<String> uuidProperty(); @ReflectiveField Property<String> nameProperty(); @ReflectiveField Property<Size> sizeProperty(); @ReflectiveField Property<Boolean> visibleProperty(); @Override boolean equals(Object o); @Override int hashCode(); void add(BehaviorTemplate aBehaviorTemplate); void remove(BehaviorTemplate aBehaviorTemplate); T getBehaviorTemplate(BehaviorType aType); @Override GameObjectClassInformation getClassInformation(); Set<BehaviorTemplate> getBehaviorTemplates(); Map<String, Object> serialize(); static GameObject deserialize(GameRuntime aGameRuntime, GameScene aGameScene, Map<String, Object> theSerializedData); static final String UUID_PROPERTY; static final String NAME_PROPERTY; static final String SIZE_PROPERTY; static final String VISIBLE_PROPERTY; }