Examples of SimpleClient


Examples of marauroa.functional.SimpleClient

   *
   * @throws Exception
   */
  public void t1_1_loginTimeout() throws Exception {
    try {
      client = new SimpleClient("log4j.properties");
      client.connect("localhost", PORT);
      client.logout();

      client.close();
    } catch (TimeoutException e) {
View Full Code Here

Examples of marauroa.functional.SimpleClient

   * @throws Exception
   */

  public void t1_1_login() throws Exception {
    try {
      client = new SimpleClient("log4j.properties");
      client.connect("localhost", PORT);
      client.login("testAnotherUsername", "NoPassword");
      fail("It must not login");
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of marauroa.functional.SimpleClient

   * @throws Exception
   */

  public void t3_loginDouble() throws Exception {
    try {
      client = new SimpleClient("log4j.properties");
      client.connect("localhost", PORT);
      client.login("testUsername", "password");

      SimpleClient altClient = new SimpleClient("log4j.properties");
      altClient.connect("localhost", PORT);
      altClient.login("testUsername", "password");

      String[] characters = altClient.getCharacters();
      assertEquals(0, characters.length);
    } catch (Exception e) {
      e.printStackTrace();
      throw e;
    }
View Full Code Here

Examples of marauroa.functional.SimpleClient

   * @throws Exception
   */

  public void t4_createCharacter() throws Exception {
    try {
      client = new SimpleClient("log4j.properties");
      client.connect("localhost", PORT);
      client.login("testUsername", "password");

      RPObject template = new RPObject();
      template.put("client", "junit");
View Full Code Here

Examples of marauroa.functional.SimpleClient

   * @throws Exception
   */

  public void t4_1_createCharacterFailure() throws Exception {
    try {
      client = new SimpleClient("log4j.properties");
      client.connect("localhost", PORT);
      client.login("testUsername", "password");

      RPObject template = new RPObject();
      template.put("client", "junit");
View Full Code Here

Examples of marauroa.functional.SimpleClient

   * @throws Exception
   */

  public void t5_chooseCharacter() throws Exception {
    try {
      client = new SimpleClient("log4j.properties");
      client.connect("localhost", PORT);
      client.login("testUsername", "password");

      String[] characters = client.getCharacters();
      assertEquals(1, characters.length);
View Full Code Here

Examples of marauroa.functional.SimpleClient

   * @throws Exception
   */

  public void t5_1_chooseWrongCharacter() throws Exception {
    try {
      client = new SimpleClient("log4j.properties");
      client.connect("localhost", PORT);
      client.login("testUsername", "password");

      String[] characters = client.getCharacters();
      assertEquals(1, characters.length);
View Full Code Here

Examples of marauroa.functional.SimpleClient

   * Test the perception management in game.
   */

  public void t6_receivePerceptions() throws Exception {
    try {
      client = new SimpleClient("log4j.properties");
      client.connect("localhost", PORT);
      client.login("testUsername", "password");

      String[] characters = client.getCharacters();
      assertEquals(1, characters.length);
View Full Code Here

Examples of marauroa.functional.SimpleClient

   */

  @SuppressWarnings("deprecation")
  public void t7_testKeepAlive() throws Exception {
    try {
      client = new SimpleClient("log4j.properties");
      client = new SimpleClient("log4j.properties") {
        @Override
        public synchronized boolean loop(int delta) {
          try {
            netMan.getMessage(30);
          } catch (InvalidVersionException e) {
View Full Code Here

Examples of marauroa.functional.SimpleClient

    }
  }

  public void t7_1_testKeepAliveWorks() throws Exception {
    try {
      client = new SimpleClient("log4j.properties");
      client.connect("localhost", PORT);
      client.login("testUsername", "password");

      String[] characters = client.getCharacters();
      assertEquals(1, characters.length);
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.