Package games.stendhal.client.entity

Examples of games.stendhal.client.entity.IEntity


   
    assertEquals("Default cursor", dummy.getCursor(), panel.getCursor());
   
    // Check adding an item to the slot
    RPObject obj = ItemTestHelper.createItem("wedding ring");
    IEntity item = EntityFactory.createEntity(obj);
    /*
     * Set a dummy owner for the panel to simulate something not owned by
     * the User
     */
    panel.setParent(item);
 
View Full Code Here


    final RPObject rp = new MockRPObject("growing_entity_spawner",
        "items/grower/carrot_grower", "carrot");
    rp.put("max_ripeness", 1);
    rp.put("width", 1);
    rp.put("height", 1);
    final IEntity en = EntityFactory.createEntity(rp);
    assertNotNull("entity should be created", en);
    assertEquals("we should have created a Carrotgrower now",
        CarrotGrower.class, en.getClass());
  }
View Full Code Here

  public final void grainfield() {
    RPObject rp = new MockRPObject("growing_entity_spawner", null, null);
    rp.put("max_ripeness", 1);
    rp.put("width", 1);
    rp.put("height", 1);
    IEntity en = EntityFactory.createEntity(rp);
    assertNotNull("entity should be created", en);
    assertEquals("we should have created a Grainfield now",
        GrainField.class, en.getClass());

    rp = new MockRPObject("growing_entity_spawner", null, null);
    rp.put("max_ripeness", 1);
    rp.put("width", 1);
    rp.put("height", 1);
    en = EntityFactory.createEntity(rp);
    assertNotNull("entity should be created", en);
    assertEquals("we should have created a Grainfield now",
        GrainField.class, en.getClass());
  }
View Full Code Here

  }

  @Test
  public final void apple() {
    final RPObject rp = new MockRPObject("item", "food", "apple");
    final IEntity en = EntityFactory.createEntity(rp);
    assertNotNull("entity should be created", en);
    assertEquals("we should have created an item by now", UseableItem.class, en
        .getClass());

  }
View Full Code Here

  }
 
  @Test
  public final void seed() {
    final RPObject rp = new MockRPObject("item", "misc", "seed");
    final IEntity en = EntityFactory.createEntity(rp);
    assertNotNull("entity should be created", en);
    assertEquals("we should have created a Useableitem by now", UseableItem.class, en
        .getClass());

  }
View Full Code Here

  }

  @Test
  public final void box() {
    final RPObject rp = new MockRPObject("item", "box");
    final IEntity en = EntityFactory.createEntity(rp);
    assertNotNull("entity should be created", en);
    assertEquals("we should have created a box by now", Box.class, en
        .getClass());
  }
View Full Code Here

  }

  @Test
  public final void player() {
    final RPObject rp = new MockRPObject("player", null);
    final IEntity en = EntityFactory.createEntity(rp);
    assertNotNull("entity should be created", en);
    assertEquals("we should have created a player by now", Player.class, en
        .getClass());
  }
View Full Code Here

  @Test
  public final void creature() {
    final RPObject rp = new MockRPObject("creature", null);
    rp.put("height", 1);
    rp.put("width", 1);
    final IEntity en = EntityFactory.createEntity(rp);
    assertNotNull("entity should be created", en);
    assertEquals("we should have created a Creature by now",
        Creature.class, en.getClass());
  }
View Full Code Here

  @Test
  public final void sheep() {
    final RPObject rp = new MockRPObject("sheep", null);
    rp.put("weight", 0);
    final IEntity en = EntityFactory.createEntity(rp);
    assertNotNull("entity should be created", en);
    assertEquals("we should have created a Sheep by now", Sheep.class, en
        .getClass());
  }
View Full Code Here

  @Test
  public final void nPC() {
    final RPObject rp = new MockRPObject("npc", null);
    rp.put("name", "bob");
    final IEntity en = EntityFactory.createEntity(rp);
    assertNotNull("entity should be created", en);
    assertEquals("we should have created a NPC by now", NPC.class, en
        .getClass());
  }
View Full Code Here

TOP

Related Classes of games.stendhal.client.entity.IEntity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.