Package org.cloudfoundry.ide.eclipse.server.core.internal

Examples of org.cloudfoundry.ide.eclipse.server.core.internal.ServerCredentialsStore


    serverWC = server.createWorkingCopy();
    cloudFoundryServer = (CloudFoundryServer) serverWC.loadAdapter(CloudFoundryServer.class, null);

    assertEquals("pwd", cloudFoundryServer.getPassword());

    ServerCredentialsStore store = cloudFoundryServer.getCredentialsStore();
    assertEquals(null, store.getPassword());

    serverWC.save(true, null);
    assertEquals("Unexpected migration of password to secure store although it was not changed", null,
        store.getPassword());
  }
View Full Code Here


    cloudFoundryServer.setPassword("newpwd");
    assertEquals("newpwd", cloudFoundryServer.getPassword());

    serverWC.save(true, null);
    ServerCredentialsStore store = cloudFoundryServer.getCredentialsStore();
    assertEquals("newpwd", store.getPassword());
  }
View Full Code Here

  public void testPersistFlush() {
    store.setUsername("user");
    assertEquals("user", store.getUsername());

    store.flush(store.getServerId());
    ServerCredentialsStore store2 = new ServerCredentialsStore(store.getServerId());
    assertEquals("user", store2.getUsername());
  }
View Full Code Here

    String newServerId = serverId();
    store.flush(newServerId);
    assertEquals(newServerId, store.getServerId());

    ServerCredentialsStore newStore = new ServerCredentialsStore(oldServerId);
    assertEquals(null, newStore.getUsername());

    newStore = new ServerCredentialsStore(newServerId);
    assertEquals("user", newStore.getUsername());
  }
View Full Code Here

  public void testPersistNoFlush() {
    store.setUsername("user");
    assertEquals("user", store.getUsername());

    ServerCredentialsStore store2 = new ServerCredentialsStore(store.getServerId());
    assertEquals(null, store2.getUsername());
  }
View Full Code Here

    return ServerCredentialsStoreTest.class.getName() + ":" + UUID.randomUUID().toString();
  }

  @Override
  protected void setUp() throws Exception {
    store = new ServerCredentialsStore(serverId());
  }
View Full Code Here

TOP

Related Classes of org.cloudfoundry.ide.eclipse.server.core.internal.ServerCredentialsStore

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.