Package games.stendhal.server.entity.creature

Examples of games.stendhal.server.entity.creature.Sheep


    assertThat(player.events().get(0).get("text"), equalTo("No player or pet named \"pet\" is currently logged in."));
 
   
    final Pet testPet = new Cat();
   
    final Sheep testSheep = new Sheep();

    player = PlayerTestHelper.createPlayer("player");
   
    StendhalRPZone stendhalRPZone = new StendhalRPZone("zone");
    MockStendlRPWorld.get().addRPZone(stendhalRPZone);
View Full Code Here


    SheepTestHelper.generateRPClasses();
    final RPAction action = new RPAction();
    final NameAction nameAction = new NameAction();
    action.put("target", "noname");
    action.put("args", "newname");
    final Sheep pet = new Sheep();
   
    zone.add(pet);
    final Player bob = PlayerTestHelper.createPlayer("bob");
    zone.add(bob);
   
    bob.setSheep(pet);
    nameAction.onAction(bob, action);
    assertThat(bob.events().get(0).get("text"), is("You don't own a pet called 'noname'"));
    assertThat(pet.getTitle(), is("sheep"));
  }
View Full Code Here

    SheepTestHelper.generateRPClasses();
    final RPAction action = new RPAction();
    final NameAction nameAction = new NameAction();
    action.put("target", "sheep");
    action.put("args", "newname");
    final Sheep pet = new Sheep();
   
    zone.add(pet);
    final Player bob = PlayerTestHelper.createPlayer("bob");
    zone.add(bob);
   
    bob.setSheep(pet);
    nameAction.onAction(bob, action);
    assertThat(bob.events().get(0).get("text"), is("You changed the name of 'sheep' to 'newname'"));
    assertThat(pet.getTitle(), is("newname"));
  }
View Full Code Here

    SheepTestHelper.generateRPClasses();
    final RPAction action = new RPAction();
    final NameAction nameAction = new NameAction();
    action.put("target", "sheep");
    action.put("args", "' newname '");
    final Sheep pet = new Sheep();
   
    zone.add(pet);
    final Player bob = PlayerTestHelper.createPlayer("bob");
    zone.add(bob);
   
    bob.setSheep(pet);
    nameAction.onAction(bob, action);
    assertThat(bob.events().get(0).get("text"), is("You changed the name of 'sheep' to 'newname'"));
    assertThat(pet.getTitle(), is("newname"));
  }
View Full Code Here

    SheepTestHelper.generateRPClasses();
    final RPAction action = new RPAction();
    final NameAction nameAction = new NameAction();
    action.put("target", "sheep");
    action.put("args", "sheep");
    final Sheep pet = new Sheep();
   
    zone.add(pet);
    final Player bob = PlayerTestHelper.createPlayer("bob");
    zone.add(bob);
   
View Full Code Here

    SheepTestHelper.generateRPClasses();
    final RPAction action = new RPAction();
    final NameAction nameAction = new NameAction();
    action.put("target", "oldname");
    action.put("args", "newname");
    final Sheep pet = new Sheep();
    pet.setTitle("oldname");
    zone.add(pet);
    final Player bob = PlayerTestHelper.createPlayer("bob");
    zone.add(bob);
   
    bob.setSheep(pet);
    nameAction.onAction(bob, action);
    assertThat(bob.events().get(0).get("text"), is("You changed the name of 'oldname' to 'newname'"));
    assertThat(pet.getTitle(), is("newname"));
  }
View Full Code Here

    SheepTestHelper.generateRPClasses();
    final RPAction action = new RPAction();
    final NameAction nameAction = new NameAction();
    action.put("target", "oldname");
    action.put("args", "sheep");
    final Sheep pet = new Sheep();
    pet.setTitle("oldname");
    zone.add(pet);
    final Player bob = PlayerTestHelper.createPlayer("bob");
    zone.add(bob);
   
    bob.setSheep(pet);
    nameAction.onAction(bob, action);
    assertThat(bob.events().get(0).get("text"), is("You changed the name of 'oldname' to 'sheep'"));
    assertThat(pet.getTitle(), is("sheep"));
  }
View Full Code Here

    SheepTestHelper.generateRPClasses();
    final RPAction action = new RPAction();
    final NameAction nameAction = new NameAction();
    action.put("target", "sheep");
    action.put("args", "newname");
    final Sheep pet = new Sheep();
    pet.setTitle("oldname");
    zone.add(pet);
    final Player bob = PlayerTestHelper.createPlayer("bob");
    zone.add(bob);
   
    bob.setSheep(pet);
    nameAction.onAction(bob, action);
    assertThat(bob.events().get(0).get("text"), is("You changed the name of 'oldname' to 'newname'"));
    assertThat(pet.getTitle(), is("newname"));
  }
View Full Code Here

    SheepTestHelper.generateRPClasses();
    final RPAction action = new RPAction();
    final NameAction nameAction = new NameAction();
    action.put("target", "sheep");
    action.put("args", "sheep");
    final Sheep pet = new Sheep();
    pet.setTitle("oldname");
    zone.add(pet);
    final Player bob = PlayerTestHelper.createPlayer("bob");
    zone.add(bob);
   
    bob.setSheep(pet);
    nameAction.onAction(bob, action);
    assertThat(bob.events().get(0).get("text"), is("You changed the name of 'oldname' to 'sheep'"));
    assertThat(pet.getTitle(), is("sheep"));
  }
View Full Code Here

    SheepTestHelper.generateRPClasses();
    final RPAction action = new RPAction();
    final NameAction nameAction = new NameAction();
    action.put("target", "oldname");
    action.put("args", "01234567890123456789");
    final Sheep pet = new Sheep();
    pet.setTitle("oldname");
    zone.add(pet);
    final Player bob = PlayerTestHelper.createPlayer("bob");
    zone.add(bob);
   
    bob.setSheep(pet);
    nameAction.onAction(bob, action);
    assertThat(bob.events().get(0).get("text"), is("You changed the name of 'oldname' to '01234567890123456789'"));
    assertThat(pet.getTitle(), is("01234567890123456789"));
  }
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.creature.Sheep

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.