Package games.stendhal.client

Examples of games.stendhal.client.MockStendhalClient


  /**
   * Tests for executeOneParam.
   */
  @Test
  public void testExecuteOneParam() {
    new MockStendhalClient() {
      @Override
      public void send(final RPAction action) {
        assertEquals("adminlevel", action.get("type"));
        assertEquals("schnick", action.get("target"));
      }
View Full Code Here


   * Tests for executeSecondParamNull.
   */
  @Test
  public void testExecuteSecondParamNull() {

    new MockStendhalClient() {
      @Override
      public void send(final RPAction action) {
        assertEquals("adminlevel", action.get("type"));
        assertEquals("schnick", action.get("target"));
        assertFalse(action.has("newlevel"));
View Full Code Here

   * Tests for executeSecondParamValid.
   */
  @Test
  public void testExecuteSecondParamValid() {

    new MockStendhalClient() {
      @Override
      public void send(final RPAction action) {
        assertEquals("adminlevel", action.get("type"));
        assertEquals("schnick", action.get("target"));
        assertEquals("100", action.get("newlevel"));
View Full Code Here

  }

  @Test
  public void testInvalidAmount() {
    // create client
    new MockStendhalClient() {
      @Override
      public void send(final RPAction action) {
        assertEquals("summonat", action.get("type"));
        assertEquals("player", action.get("target"));
        assertEquals("bag", action.get("slot"));
View Full Code Here

  public void testExecute() {
    // create client UI
    final MockClientUI clientUI = new MockClientUI();

    // create client
    new MockStendhalClient() {
      @Override
      public void send(final RPAction action) {
        assertEquals("summonat", action.get("type"));
        assertEquals("player", action.get("target"));
        assertEquals("bag", action.get("slot"));
View Full Code Here

  public void testSpaceHandling() {
    // create client UI
    final MockClientUI clientUI = new MockClientUI();

    // create client
    new MockStendhalClient() {
      @Override
      public void send(final RPAction action) {
        assertEquals("summonat", action.get("type"));
        assertEquals("player", action.get("target"));
        assertEquals("bag", action.get("slot"));
View Full Code Here

    // create client UI
    @SuppressWarnings("unused")
    final MockClientUI clientUI = new MockClientUI();

    // create client
    new MockStendhalClient() {
      @Override
      public void send(final RPAction action) {
        assertEquals("summonat", action.get("type"));
        assertEquals("memem", action.get("target"));
        assertEquals("bag", action.get("slot"));
View Full Code Here

TOP

Related Classes of games.stendhal.client.MockStendhalClient

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.