Package org.hive2hive.core.security

Examples of org.hive2hive.core.security.UserCredentials


  @Override
  protected void createItems() {
    CreateUserCredentials = new H2HConsoleMenuItem("Create User Credentials") {
      protected void execute() throws Exception {
        userCredentials = new UserCredentials(askUsedId(), askPassword(), askPin());
        exit();
      }
    };
  }
View Full Code Here


    NetworkTestUtil.shutdownH2HNetwork(network);
  }

  @Test
  public void isRegisteredTest() throws NoPeerConnectionException, InterruptedException {
    UserCredentials userCredentials = NetworkTestUtil.generateRandomCredentials();
    String userId = userCredentials.getUserId();

    // all nodes must have same result: false
    for (int i = 0; i < network.size(); i++) {

      boolean isRegistered = network.get(i).getUserManager().isRegistered(userId);
View Full Code Here

    // TODO test after unregistering
  }

  @Test
  public void isLoggedInTest() throws NoPeerConnectionException, InterruptedException, NoSessionException {
    UserCredentials userCredentials = NetworkTestUtil.generateRandomCredentials();
    String userId = userCredentials.getUserId();

    Path rootPah = FileTestUtil.getTempDirectory().toPath();

    // all nodes must have same result: false
    for (int i = 0; i < network.size(); i++) {
View Full Code Here

    // random credentials
    String userName = NetworkTestUtil.randomString();
    String password = NetworkTestUtil.randomString();
    String pin = NetworkTestUtil.randomString();

    UserCredentials credentials1 = new UserCredentials(userName, password, pin);
    UserCredentials credentials2 = new UserCredentials(userName, password, pin);

    // test if same result twice
    Assert.assertEquals(credentials1.getProfileLocationKey(), credentials2.getProfileLocationKey());
  }
View Full Code Here

TOP

Related Classes of org.hive2hive.core.security.UserCredentials

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.