From 67ed1723ec5ce5dd9acbe85b652ce4e54b1b8e1a Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Mon, 16 Oct 2023 14:26:34 -0700 Subject: [PATCH] Java client: sort item mappers by class name --- .../client/entity/factory/EntityMap.java | 141 ++++++++--------- .../gui/j2d/entity/EntityViewFactory.java | 147 ++++++++---------- .../gui/j2d/entity/EntityViewFactoryTest.java | 112 ++++++------- 3 files changed, 183 insertions(+), 217 deletions(-) diff --git a/src/games/stendhal/client/entity/factory/EntityMap.java b/src/games/stendhal/client/entity/factory/EntityMap.java index 078c8522f7b..6f2e451cfb7 100644 --- a/src/games/stendhal/client/entity/factory/EntityMap.java +++ b/src/games/stendhal/client/entity/factory/EntityMap.java @@ -75,102 +75,91 @@ public final class EntityMap { * Fills EntityMap with initial values. */ private static void register() { - register("entity", null, null, Entity.class); - - register("player", null, null, Player.class); - - register("creature", "ent", null, BossCreature.class); - register("creature", null, null, Creature.class); - - register("sheep", null, null, Sheep.class); - - register("baby_dragon", null, null, Pet.class); - register("purple_dragon", null, null, Pet.class); - register("cat", null, null, Pet.class); - register("pet", null, null, Pet.class); - - register("npc", null, null, NPC.class); - register("training_dummy", null, null, NPC.class); - - register("plant_grower", null, null, PlantGrower.class); - - register("flyover", null, null, FlyOverArea.class); - register("walkblocker", null, null, WalkBlocker.class); - - register("growing_entity_spawner", "items/grower/carrot_grower", null, - CarrotGrower.class); - register("growing_entity_spawner", "items/grower/wood_grower", null, - CarrotGrower.class); - register("growing_entity_spawner", null, null, GrainField.class); - - register("useable_entity", null, null, StatefulEntity.class); - // deprecated start - register("gold_source", null, null, StatefulEntity.class); - register("fish_source", null, null, StatefulEntity.class); - register("well_source", null, null, StatefulEntity.class); - // deprecated end - - register("area", null, null, InvisibleEntity.class); - register("block", null, null, Block.class); - - register("food", null, null, SheepFood.class); - register("chest", null, null, Chest.class); - - register("corpse", null, null, Corpse.class); - - register("blood", null, null, Blood.class); - - register("blackboard", null, null, Sign.class); - register("sign", null, null, Sign.class); - register("rented_sign", null, null, Sign.class); - register("shop_sign", null, null, Sign.class); - + // item register("item", null, null, Item.class); + register("item", "ammunition", null, StackableItem.class); register("item", "box", null, Box.class); - register("item", "ring", null, UseableRing.class); - register("item", "ring", "emerald-ring", BreakableRing.class); - + register("item", "club", "wizard_staff", UseableItem.class); + register("item", "container", null, StackableItem.class); + // FIXME: `games.stendhal.server.entity.item.ItemTest` copy constructor test fails + //~ register("item", "documents", "coupon", StackableItem.class); register("item", "drink", null, UseableItem.class); register("item", "flower", null, StackableItem.class); register("item", "food", null, UseableItem.class); - register("item", "tool", "foodmill", UseableItem.class); - register("item", "tool", "sugarmill", UseableItem.class); - register("item", "tool", "scrolleraser", UseableItem.class); - register("item", "tool", "rope", StackableItem.class); register("item", "herb", null, StackableItem.class); + register("item", "jewellery", null, StackableItem.class); register("item", "misc", null, StackableItem.class); - register("item", "money", null, StackableItem.class); + register("item", "misc", "bulb", UseableItem.class); + register("item", "misc", "seed", UseableItem.class); register("item", "missile", null, StackableItem.class); - register("item", "ammunition", null, StackableItem.class); - register("item", "container", null, StackableItem.class); + register("item", "money", null, StackableItem.class); + register("item", "resource", null, StackableItem.class); + register("item", "ring", null, UseableRing.class); + register("item", "ring", "emerald-ring", BreakableRing.class); + register("item", "scroll", null, UseableItem.class); register("item", "special", null, StackableItem.class); register("item", "special", "mithril clasp", Item.class); - register("item", "club", "wizard_staff", UseableItem.class); - register("item", "misc", "seed", UseableItem.class); - register("item", "misc", "bulb", UseableItem.class); - - register("item", "resource", null, StackableItem.class); + register("item", "token", null, Item.class); + register("item", "tool", "foodmill", UseableItem.class); + register("item", "tool", "rope", StackableItem.class); + register("item", "tool", "scrolleraser", UseableItem.class); + register("item", "tool", "sugarmill", UseableItem.class); - register("item", "scroll", null, UseableItem.class); - register("item", "jewellery", null, StackableItem.class); + // grower + register("growing_entity_spawner", null, null, GrainField.class); + register("growing_entity_spawner", "items/grower/carrot_grower", null, CarrotGrower.class); + register("growing_entity_spawner", "items/grower/wood_grower", null, CarrotGrower.class); + register("plant_grower", null, null, PlantGrower.class); - register("item", "token", null, Item.class); - // FIXME: `games.stendhal.server.entity.item.ItemTest` copy constructor test fails - //~ register("item", "documents", "coupon", StackableItem.class); + // sign + register("rented_sign", null, null, Sign.class); + register("shop_sign", null, null, Sign.class); + register("sign", null, null, Sign.class); - register("portal", null, null, Portal.class); - register("house_portal", null, null, HousePortal.class); + // portal & door register("door", null, null, Door.class); - register("fire", null, null, Fire.class); + register("gate", null, null, Gate.class); + register("house_portal", null, null, HousePortal.class); + register("portal", null, null, Portal.class); - register("spell", null, null, Spell.class); + // NPC + register("baby_dragon", null, null, Pet.class); + register("cat", null, null, Pet.class); + register("npc", null, null, NPC.class); + register("pet", null, null, Pet.class); + register("purple_dragon", null, null, Pet.class); + register("sheep", null, null, Sheep.class); + register("training_dummy", null, null, NPC.class); - register("gate", null, null, Gate.class); + // creature + register("creature", null, null, Creature.class); + register("creature", "ent", null, BossCreature.class); + + // misc + register("area", null, null, InvisibleEntity.class); + register("blackboard", null, null, Sign.class); + register("block", null, null, Block.class); + register("blood", null, null, Blood.class); + register("chest", null, null, Chest.class); + register("corpse", null, null, Corpse.class); + register("entity", null, null, Entity.class); + register("fire", null, null, Fire.class); + register("flyover", null, null, FlyOverArea.class); + register("food", null, null, SheepFood.class); register("game_board", null, null, GameBoard.class); + register("looped_sound_source", null, null, LoopedSoundSource.class); + register("player", null, null, Player.class); + register("spell", null, null, Spell.class); + register("useable_entity", null, null, StatefulEntity.class); + register("walkblocker", null, null, WalkBlocker.class); register("wall", null, null, Wall.class); register("weather_entity", null, null, InvisibleEntity.class); - register("looped_sound_source", null, null, LoopedSoundSource.class); + + // deprecated + register("fish_source", null, null, StatefulEntity.class); + register("gold_source", null, null, StatefulEntity.class); + register("well_source", null, null, StatefulEntity.class); } /** diff --git a/src/games/stendhal/client/gui/j2d/entity/EntityViewFactory.java b/src/games/stendhal/client/gui/j2d/entity/EntityViewFactory.java index 04107b197d1..a3184a43ccc 100644 --- a/src/games/stendhal/client/gui/j2d/entity/EntityViewFactory.java +++ b/src/games/stendhal/client/gui/j2d/entity/EntityViewFactory.java @@ -122,103 +122,92 @@ static Class getViewClass(final String type, final String * Configure the view map. */ private static void configure() { + // item + register("item", null, null, Item2DView.class); + register("item", "ammunition", null, StackableItem2DView.class); + register("item", "book", "bestiary", UseableGenericItem2DView.class); + register("item", "box", null, Box2DView.class); + register("item", "club", "wizard_staff", UseableItem2DView.class); + register("item", "container", null, StackableItem2DView.class); + // FIXME: `games.stendhal.server.entity.item.ItemTest` copy constructor test fails + //~ register("item", "documents", "coupon", StackableItem2DView.class); + register("item", "drink", null, UseableItem2DView.class); + register("item", "flower", null, StackableItem2DView.class); + register("item", "food", null, UseableItem2DView.class); + register("item", "herb", null, StackableItem2DView.class); + register("item", "jewellery", null, StackableItem2DView.class); + register("item", "misc", null, StackableItem2DView.class); + register("item", "misc", "bulb", UseableItem2DView.class); + register("item", "misc", "seed", UseableItem2DView.class); + register("item", "misc", "snowglobe", UseableGenericItem2DView.class); + register("item", "misc", "teddy", UseableGenericItem2DView.class); + register("item", "missile", null, StackableItem2DView.class); + register("item", "money", null, StackableItem2DView.class); + register("item", "resource", null, StackableItem2DView.class); + register("item", "ring", null, Ring2DView.class); + register("item", "ring", "emerald-ring", BreakableRing2DView.class); + register("item", "ring", "wedding", UseableRing2DView.class); + register("item", "scroll", null, UseableItem2DView.class); + register("item", "special", null, StackableItem2DView.class); + register("item", "special", "mithril clasp", Item2DView.class); + register("item", "tool", "foodmill", UseableItem2DView.class); + register("item", "tool", "metal_detector", UseableGenericItem2DView.class); + register("item", "tool", "rope", StackableItem2DView.class); + register("item", "tool", "rotary_cutter", UseableGenericItem2DView.class); + register("item", "tool", "scrolleraser", UseableItem2DView.class); + register("item", "tool", "sugarmill", UseableItem2DView.class); - register("area", null, null, InvisibleEntity2DView.class); - - register("block", null, null, LookableEntity2DView.class); - register("blood", null, null, Blood2DView.class); - - register("creature", "ent", null, BossCreature2DView.class); - - register("growing_entity_spawner", "items/grower/wood_grower", null, CarrotGrower2DView.class); + // grower + register("growing_entity_spawner", null, null, GrainField2DView.class); register("growing_entity_spawner", "items/grower/carrot_grower", null, CarrotGrower2DView.class); - register("chest", null, null, Chest2DView.class); - register("corpse", null, null, Corpse2DView.class); + register("growing_entity_spawner", "items/grower/wood_grower", null, CarrotGrower2DView.class); + register("plant_grower", null, null, PlantGrower2DView.class); - register("creature", null, null, Creature2DView.class); + // sign + register("blackboard", null, null, Sign2DView.class); + register("rented_sign", null, null, Sign2DView.class); + register("shop_sign", null, null, ShopSign2DView.class); + register("sign", null, null, Sign2DView.class); + // portal & door register("door", null, null, Door2DView.class); - - register("fire", null, null, UseableEntity2DView.class); - register("fish_source", null, null, UseableEntity2DView.class); - - register("game_board", null, null, GameBoard2DView.class); register("gate", null, null, Gate2DView.class); - - register("gold_source", null, null, UseableEntity2DView.class); - - register("growing_entity_spawner", null, null, GrainField2DView.class); - register("house_portal", null, null, HousePortal2DView.class); + register("portal", null, null, Portal2DView.class); - register("item", "box", null, Box2DView.class); - register("item", "special", "mithril clasp", Item2DView.class); - register("item", null, null, Item2DView.class); - register("npc", null, null, NPC2DView.class); - register("training_dummy", null, null, TrainingDummy2DView.class); - + // NPC + register("baby_dragon", null, null, Pet2DView.class); register("cat", null, null, Pet2DView.class); + register("npc", null, null, NPC2DView.class); register("pet", null, null, Pet2DView.class); - register("baby_dragon", null, null, Pet2DView.class); register("purple_dragon", null, null, Pet2DView.class); + register("sheep", null, null, Sheep2DView.class); + register("training_dummy", null, null, TrainingDummy2DView.class); - register("plant_grower", null, null, PlantGrower2DView.class); - - register("player", null, null, Player2DView.class); + // creature + register("creature", null, null, Creature2DView.class); + register("creature", "ent", null, BossCreature2DView.class); - register("portal", null, null, Portal2DView.class); + // resource sources + register("fish_source", null, null, UseableEntity2DView.class); + register("gold_source", null, null, UseableEntity2DView.class); + register("well_source", null, null, UseableEntity2DView.class); - register("sheep", null, null, Sheep2DView.class); + // misc + register("area", null, null, InvisibleEntity2DView.class); + register("block", null, null, LookableEntity2DView.class); + register("blood", null, null, Blood2DView.class); + register("chest", null, null, Chest2DView.class); + register("corpse", null, null, Corpse2DView.class); + register("fire", null, null, UseableEntity2DView.class); + register("flyover", null, null, FlyOverArea2DView.class); register("food", null, null, SheepFood2DView.class); + register("game_board", null, null, GameBoard2DView.class); + register("player", null, null, Player2DView.class); register("spell", null, null, Spell2DView.class); - - register("sign", null, null, Sign2DView.class); - register("blackboard", null, null, Sign2DView.class); - register("rented_sign", null, null, Sign2DView.class); - register("shop_sign", null, null, ShopSign2DView.class); - - register("item", "jewellery", null, StackableItem2DView.class); - register("item", "flower", null, StackableItem2DView.class); - register("item", "resource", null, StackableItem2DView.class); - register("item", "herb", null, StackableItem2DView.class); - register("item", "misc", null, StackableItem2DView.class); - register("item", "money", null, StackableItem2DView.class); - register("item", "missile", null, StackableItem2DView.class); - register("item", "ammunition", null, StackableItem2DView.class); - register("item", "container", null, StackableItem2DView.class); - register("item", "special", null, StackableItem2DView.class); - // FIXME: `games.stendhal.server.entity.item.ItemTest` copy constructor test fails - //~ register("item", "documents", "coupon", StackableItem2DView.class); - - register("item", "club", "wizard_staff", UseableItem2DView.class); - register("item", "misc", "seed", UseableItem2DView.class); - register("item", "misc", "bulb", UseableItem2DView.class); - - register("item", "scroll", null, UseableItem2DView.class); - - register("item", "food", null, UseableItem2DView.class); - register("item", "drink", null, UseableItem2DView.class); - register("item", "tool", "foodmill", UseableItem2DView.class); - register("item", "tool", "sugarmill", UseableItem2DView.class); - register("item", "tool", "scrolleraser", UseableItem2DView.class); - register("item", "tool", "rope", StackableItem2DView.class); - - register("item", "ring", null, Ring2DView.class); - register("item", "ring", "emerald-ring", BreakableRing2DView.class); - register("item", "ring", "wedding", UseableRing2DView.class); - - register("item", "book", "bestiary", UseableGenericItem2DView.class); - register("item", "misc", "snowglobe", UseableGenericItem2DView.class); - register("item", "misc", "teddy", UseableGenericItem2DView.class); - register("item", "tool", "metal_detector", UseableGenericItem2DView.class); - register("item", "tool", "rotary_cutter", UseableGenericItem2DView.class); - register("useable_entity", null, null, UseableEntity2DView.class); - - register("flyover", null, null, FlyOverArea2DView.class); - register("wall", null, null, Wall2DView.class); register("walkblocker", null, null, WalkBlocker2DView.class); - register("well_source", null, null, UseableEntity2DView.class); + register("wall", null, null, Wall2DView.class); } /** diff --git a/tests/games/stendhal/client/gui/j2d/entity/EntityViewFactoryTest.java b/tests/games/stendhal/client/gui/j2d/entity/EntityViewFactoryTest.java index 96ab07cc2a2..ca7442bef89 100644 --- a/tests/games/stendhal/client/gui/j2d/entity/EntityViewFactoryTest.java +++ b/tests/games/stendhal/client/gui/j2d/entity/EntityViewFactoryTest.java @@ -33,82 +33,70 @@ public void setUp() throws Exception { */ @Test public final void testCreate() { - assertEquals(EntityViewFactory.getViewClass("blood", null, null), Blood2DView.class); - assertEquals(EntityViewFactory.getViewClass("creature", "ent", null), BossCreature2DView.class); - + // item + assertEquals(EntityViewFactory.getViewClass("item", null, null), Item2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "ammunition", null), StackableItem2DView.class); assertEquals(EntityViewFactory.getViewClass("item", "box", null), Box2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "club", "wizard_staff"), UseableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "container", null), StackableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "crystal", null), Item2DView.class); + // FIXME: `games.stendhal.server.entity.item.ItemTest` copy constructor test fails + //~ assertEquals(EntityViewFactory.getViewClass("item", "documents", "coupon"), StackableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "drink", null), UseableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "flower", null), StackableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "food", null), UseableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "herb", null), StackableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "jewellery", null), StackableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "misc", null), StackableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "misc", "seed"), UseableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "missile", null), StackableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "money", null), StackableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "resource", null), StackableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "ring", null), Ring2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "ring", "emerald-ring"), BreakableRing2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "ring", "wedding"), UseableRing2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "scroll", null), UseableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "special", null), StackableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "special", "mithril clasp"), Item2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "tool", "foodmill"), UseableItem2DView.class); + assertEquals(EntityViewFactory.getViewClass("item", "tool", "sugarmill"), UseableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("growing_entity_spawner", "items/grower/wood_grower", null), CarrotGrower2DView.class); + // grower + assertEquals(EntityViewFactory.getViewClass("growing_entity_spawner", null, null), GrainField2DView.class); assertEquals(EntityViewFactory.getViewClass("growing_entity_spawner", "items/grower/carrot_grower", null), CarrotGrower2DView.class); - assertEquals(EntityViewFactory.getViewClass("chest", null, null), Chest2DView.class); - assertEquals(EntityViewFactory.getViewClass("corpse", null, null), Corpse2DView.class); + assertEquals(EntityViewFactory.getViewClass("growing_entity_spawner", "items/grower/wood_grower", null), CarrotGrower2DView.class); + assertEquals(EntityViewFactory.getViewClass("plant_grower", null, null), PlantGrower2DView.class); - assertEquals(EntityViewFactory.getViewClass("creature", null, null), Creature2DView.class); + // sign + assertEquals(EntityViewFactory.getViewClass("blackboard", null, null), Sign2DView.class); + assertEquals(EntityViewFactory.getViewClass("sign", null, null), Sign2DView.class); + // portal & door assertEquals(EntityViewFactory.getViewClass("door", null, null), Door2DView.class); - - assertEquals(EntityViewFactory.getViewClass("fire", null, null), UseableEntity2DView.class); - - assertEquals(EntityViewFactory.getViewClass("gate", null, null), Gate2DView.class); - - assertEquals(EntityViewFactory.getViewClass("growing_entity_spawner", null, null), GrainField2DView.class); - assertEquals(EntityViewFactory.getViewClass("house_portal", null, null), HousePortal2DView.class); + assertEquals(EntityViewFactory.getViewClass("portal", null, null), Portal2DView.class); - assertEquals(EntityViewFactory.getViewClass("area", null, null), InvisibleEntity2DView.class); - - assertEquals(EntityViewFactory.getViewClass("item", "special", "mithril clasp"), Item2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "crystal", null), Item2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", null, null), Item2DView.class); - assertEquals(EntityViewFactory.getViewClass("npc", null, null), NPC2DView.class); - + // NPC + assertEquals(EntityViewFactory.getViewClass("baby_dragon", null, null), Pet2DView.class); assertEquals(EntityViewFactory.getViewClass("cat", null, null), Pet2DView.class); + assertEquals(EntityViewFactory.getViewClass("npc", null, null), NPC2DView.class); assertEquals(EntityViewFactory.getViewClass("pet", null, null), Pet2DView.class); - assertEquals(EntityViewFactory.getViewClass("baby_dragon", null, null), Pet2DView.class); - - assertEquals(EntityViewFactory.getViewClass("plant_grower", null, null), PlantGrower2DView.class); - - assertEquals(EntityViewFactory.getViewClass("player", null, null), Player2DView.class); - - assertEquals(EntityViewFactory.getViewClass("portal", null, null), Portal2DView.class); - - assertEquals(EntityViewFactory.getViewClass("item", "ring", "emerald-ring"), BreakableRing2DView.class); - assertEquals(EntityViewFactory.getViewClass("sheep", null, null), Sheep2DView.class); - assertEquals(EntityViewFactory.getViewClass("food", null, null), SheepFood2DView.class); - - assertEquals(EntityViewFactory.getViewClass("sign", null, null), Sign2DView.class); - assertEquals(EntityViewFactory.getViewClass("blackboard", null, null), Sign2DView.class); - - assertEquals(EntityViewFactory.getViewClass("item", "jewellery", null), StackableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "flower", null), StackableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "resource", null), StackableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "herb", null), StackableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "misc", null), StackableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "money", null), StackableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "missile", null), StackableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "ammunition", null), StackableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "container", null), StackableItem2DView.class); - // FIXME: `games.stendhal.server.entity.item.ItemTest` copy constructor test fails - //~ assertEquals(EntityViewFactory.getViewClass("item", "documents", "coupon"), StackableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "special", null), StackableItem2DView.class); - - - assertEquals(EntityViewFactory.getViewClass("item", "club", "wizard_staff"), UseableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "misc", "seed"), UseableItem2DView.class); - - assertEquals(EntityViewFactory.getViewClass("item", "scroll", null), UseableItem2DView.class); - - assertEquals(EntityViewFactory.getViewClass("item", "food", null), UseableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "drink", null), UseableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "tool", "foodmill"), UseableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "tool", "sugarmill"), UseableItem2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "ring", null), Ring2DView.class); - assertEquals(EntityViewFactory.getViewClass("item", "ring", "wedding"), UseableRing2DView.class); + // creature + assertEquals(EntityViewFactory.getViewClass("creature", null, null), Creature2DView.class); + assertEquals(EntityViewFactory.getViewClass("creature", "ent", null), BossCreature2DView.class); + // misc + assertEquals(EntityViewFactory.getViewClass("area", null, null), InvisibleEntity2DView.class); + assertEquals(EntityViewFactory.getViewClass("block", null, null), LookableEntity2DView.class); + assertEquals(EntityViewFactory.getViewClass("blood", null, null), Blood2DView.class); + assertEquals(EntityViewFactory.getViewClass("chest", null, null), Chest2DView.class); + assertEquals(EntityViewFactory.getViewClass("corpse", null, null), Corpse2DView.class); + assertEquals(EntityViewFactory.getViewClass("fire", null, null), UseableEntity2DView.class); + assertEquals(EntityViewFactory.getViewClass("food", null, null), SheepFood2DView.class); + assertEquals(EntityViewFactory.getViewClass("player", null, null), Player2DView.class); assertEquals(EntityViewFactory.getViewClass("walkblocker", null, null), WalkBlocker2DView.class); - } }