Examples of events()


Examples of com.saasovation.common.event.sourcing.EventStream.events()

        this.eventStore.appendWith(eventId, events);

        EventStream eventStream = this.eventStore.fullEventStreamFor(eventId);

        assertEquals(2, eventStream.version());
        assertEquals(2, eventStream.events().size());

        for (int idx = 1; idx <= 2; ++idx) {
            DomainEvent domainEvent = eventStream.events().get(idx - 1);

            assertEquals(idx, ((TestableDomainEvent) domainEvent).id());
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

  @Test
  public void testname() throws Exception {
    ListRaids script = new ListRaids();
    Player player = PlayerTestHelper.createPlayer("george");
    script.execute(player, null);
    assertThat(player.events().get(0).toString(), containsString("CreateRaid"));
  }

}
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

    final RPAction action = new RPAction();

    action.put("type", "");
    final Player caster = PlayerTestHelper.createPlayer("bob");
    CommandCenter.execute(caster, action);
    assertEquals("Unknown command . Please type /help to get a list.", caster.events().get(0).get("text"));
  }

}
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

    drop.put("baseslot", "nonExistingSlotXXXXXX");
    drop.put("baseitem", -1);

    final EquipmentAction action = new DropAction();
    action.onAction(player, drop);
    Assert.assertEquals("Source nonExistingSlotXXXXXX does not exist", player.events().get(0).get("text"));
  }

  /**
   * Tests for dropNonExistingItem.
   */
 
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

    Player bob = PlayerTestHelper.createPlayer("bob");
    StendhalRPZone zone = new StendhalRPZone("bla_jail");
    zone.setNoItemMoveMessage("For security reasons, items may not be moved around in jail.");
    zone.add(bob);
    action.onAction(bob, new RPAction());
    assertFalse(bob.events().isEmpty());
    assertEquals("For security reasons, items may not be moved around in jail.", bob.events().get(0).get("text"));


    bob = PlayerTestHelper.createPlayer("bobby");
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

    StendhalRPZone zone = new StendhalRPZone("bla_jail");
    zone.setNoItemMoveMessage("For security reasons, items may not be moved around in jail.");
    zone.add(bob);
    action.onAction(bob, new RPAction());
    assertFalse(bob.events().isEmpty());
    assertEquals("For security reasons, items may not be moved around in jail.", bob.events().get(0).get("text"));


    bob = PlayerTestHelper.createPlayer("bobby");

    zone = new StendhalRPZone("bla_jail_not");
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

    zone = new StendhalRPZone("bla_jail_not");

    zone.add(bob);
    action.onAction(bob, new RPAction());
    assertTrue(bob.events().isEmpty());
  }

  /**
   * Tests for dropItem.
   */
 
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

    final EquipmentAction action = new DropAction();
    assertEquals(0, localzone.getItemsOnGround().size());
    assertTrue(drop.has(EquipActionConsts.BASE_ITEM));

    action.onAction(player, drop);
    Assert.assertEquals(0, player.events().size());
    assertEquals(1, localzone.getItemsOnGround().size());
    assertFalse(player.isEquipped("cheese"));

  }
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

    final EquipmentAction action = new DropAction();
    assertEquals(0, localzone.getItemsOnGround().size());
    assertTrue(drop.has(EquipActionConsts.BASE_ITEM));

    action.onAction(player, drop);
    Assert.assertEquals(0, player.events().size());
    assertEquals(1, localzone.getItemsOnGround().size());
    assertFalse(player.isEquipped("cheese", 4));
    assertTrue(player.isEquipped("cheese", 3));
  }
View Full Code Here

Examples of games.stendhal.server.entity.player.Player.events()

  public final void testTellAllAction() {
    final Player pl = PlayerTestHelper.createPlayer("dummy");
    MockStendhalRPRuleProcessor.get().addPlayer(pl);

    CommandCenter.execute(pl, new RPAction());
    assertEquals("Unknown command null. Please type /help to get a list.", pl.events().get(0).get("text"));

    pl.clearEvents();
    pl.setAdminLevel(5000);
    final RPAction action = new RPAction();
    action.put("type", "tellall");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.