Package marauroa.functional

Examples of marauroa.functional.SimpleClient.login()


            assertEquals("testUsername" + i, resAcc.getUsername());
            assertEquals(Result.OK_CREATED, resAcc.getResult());

            Thread.sleep(Math.abs(rand.nextInt() % 100) * 1000 + 5000);

            client.login("testUsername" + i, "password");

            RPObject template = new RPObject();
            template.put("client", "junit" + i);
            CharacterResult resChar = client.createCharacter("testCharacter", template);
            assertEquals("testCharacter", resChar.getCharacter());
View Full Code Here


            client.logout();

            for (int logins = 0; logins < TIMES_TO_LOGIN; logins++) {
              Thread.sleep(Math.abs(rand.nextInt() % 30) * 1000 + 5000);
              client.login("testUsername" + i, "password");

              String[] characters = client.getCharacters();
              assertEquals(1, characters.length);
              assertEquals("testCharacter", characters[0]);

View Full Code Here

            assertTrue("Account creation must not fail", !resAcc.failed());
            assertEquals("testUsername" + i, resAcc.getUsername());

            Thread.sleep(Math.abs(new Random().nextInt() % 20) * 1000);

            client.login("testUsername" + i, "password");

            RPObject template = new RPObject();
            template.put("client", "junit" + i);
            CharacterResult resChar = client.createCharacter("testCharacter", template);
            assertEquals("testCharacter", resChar.getCharacter());
View Full Code Here

      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();
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.