Package com.antonytrupe.server.tend

Examples of com.antonytrupe.server.tend.API


  }

  @Test
  @Ignore
  public void createSaveBoard() throws GameEngineException {
    API api = new API();
    ScriptableObject board = api.createBoard();

    String json = (String) ge.invoke(board, "stringify");

    Long id = api.getId(board);
    Entity result;
    if (id != null) {
      result = ge.persistence.save("Board", id, "json", json);
    } else {
      result = ge.persistence.save("Board");
      id = result.getKey().getId();
    }
    api.setId(board, result.getKey().getId());

    json = (String) ge.invoke(board, "stringify");

    result = ge.persistence.save("Board", id, "json", json);

    api.update(board, json);

    json = (String) ge.invoke(board, "stringify");

    assertEquals(1, board.get("id"));
  }
View Full Code Here

TOP

Related Classes of com.antonytrupe.server.tend.API

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.