Examples of readUserByProperty()


Examples of org.eclipse.orion.internal.server.core.metastore.SimpleMetaStoreUserPropertyCache.readUserByProperty()

    String users[] = {"anthony", "ahunter", "anthonyh"};
    List<String> userList = new ArrayList<String>(Arrays.asList(users));
    userPropertyCache.addUsers(userList);

    // ensure the users are in the cache
    assertEquals("anthony", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "anthony", false, false));
    assertEquals("ahunter", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "ahunter", false, false));
    assertEquals("anthonyh", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "anthonyh", false, false));
    assertNull(userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "fred", false, false));
  }
View Full Code Here

Examples of org.eclipse.orion.internal.server.core.metastore.SimpleMetaStoreUserPropertyCache.readUserByProperty()

    List<String> userList = new ArrayList<String>(Arrays.asList(users));
    userPropertyCache.addUsers(userList);

    // ensure the users are in the cache
    assertEquals("anthony", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "anthony", false, false));
    assertEquals("ahunter", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "ahunter", false, false));
    assertEquals("anthonyh", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "anthonyh", false, false));
    assertNull(userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "fred", false, false));
  }

  @Test
View Full Code Here

Examples of org.eclipse.orion.internal.server.core.metastore.SimpleMetaStoreUserPropertyCache.readUserByProperty()

    userPropertyCache.addUsers(userList);

    // ensure the users are in the cache
    assertEquals("anthony", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "anthony", false, false));
    assertEquals("ahunter", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "ahunter", false, false));
    assertEquals("anthonyh", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "anthonyh", false, false));
    assertNull(userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "fred", false, false));
  }

  @Test
  public void testAddUserProperty() throws CoreException {
View Full Code Here

Examples of org.eclipse.orion.internal.server.core.metastore.SimpleMetaStoreUserPropertyCache.readUserByProperty()

    // ensure the users are in the cache
    assertEquals("anthony", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "anthony", false, false));
    assertEquals("ahunter", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "ahunter", false, false));
    assertEquals("anthonyh", userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "anthonyh", false, false));
    assertNull(userPropertyCache.readUserByProperty(UserConstants2.USER_NAME, "fred", false, false));
  }

  @Test
  public void testAddUserProperty() throws CoreException {
    // create a user property cache for a property
View Full Code Here

Examples of org.eclipse.orion.internal.server.core.metastore.SimpleMetaStoreUserPropertyCache.readUserByProperty()

    userPropertyCache.register(propertyKeys);
    assertTrue(userPropertyCache.isRegistered("property"));

    // add a property value and ensure it is in the cache
    userPropertyCache.add("property", "value", "user");
    assertEquals("user", userPropertyCache.readUserByProperty("property", "value", false, false));
  }

  @Test
  public void testDeleteUser() throws CoreException {
    // create a user property cache for a property
View Full Code Here

Examples of org.eclipse.orion.internal.server.core.metastore.SimpleMetaStoreUserPropertyCache.readUserByProperty()

    userPropertyCache.register(propertyKeys);
    assertTrue(userPropertyCache.isRegistered("property"));

    // add a property value and ensure it is in the cache
    userPropertyCache.add("property", "value", "user");
    assertEquals("user", userPropertyCache.readUserByProperty("property", "value", false, false));

    // delete the user and ensure it is no longer in the cache
    userPropertyCache.deleteUser("user");
    assertNull(userPropertyCache.readUserByProperty("property", "value", false, false));
  }
View Full Code Here

Examples of org.eclipse.orion.internal.server.core.metastore.SimpleMetaStoreUserPropertyCache.readUserByProperty()

    userPropertyCache.add("property", "value", "user");
    assertEquals("user", userPropertyCache.readUserByProperty("property", "value", false, false));

    // delete the user and ensure it is no longer in the cache
    userPropertyCache.deleteUser("user");
    assertNull(userPropertyCache.readUserByProperty("property", "value", false, false));
  }

  @Test
  public void testDeleteUserProperty() throws CoreException {
    // create a user property cache for a property
View Full Code Here

Examples of org.eclipse.orion.internal.server.core.metastore.SimpleMetaStoreUserPropertyCache.readUserByProperty()

    userPropertyCache.register(propertyKeys);
    assertTrue(userPropertyCache.isRegistered("property"));

    // add a property value and ensure it is in the cache
    userPropertyCache.add("property", "value", "user");
    assertEquals("user", userPropertyCache.readUserByProperty("property", "value", false, false));

    // delete the property value and ensure it is no longer in the cache
    userPropertyCache.delete("property", "value", "user");
    assertNull(userPropertyCache.readUserByProperty("property", "value", false, false));
  }
View Full Code Here

Examples of org.eclipse.orion.internal.server.core.metastore.SimpleMetaStoreUserPropertyCache.readUserByProperty()

    userPropertyCache.add("property", "value", "user");
    assertEquals("user", userPropertyCache.readUserByProperty("property", "value", false, false));

    // delete the property value and ensure it is no longer in the cache
    userPropertyCache.delete("property", "value", "user");
    assertNull(userPropertyCache.readUserByProperty("property", "value", false, false));
  }

  @Test
  public void testNoUserProperty() {
    SimpleMetaStoreUserPropertyCache userPropertyCache = new SimpleMetaStoreUserPropertyCache();
View Full Code Here

Examples of org.eclipse.orion.internal.server.core.metastore.SimpleMetaStoreUserPropertyCache.readUserByProperty()

  @Test
  public void testNoUserProperty() {
    SimpleMetaStoreUserPropertyCache userPropertyCache = new SimpleMetaStoreUserPropertyCache();
    userPropertyCache.add("property", "value", "user");
    try {
      assertNull(userPropertyCache.readUserByProperty("property", "value", false, false));
    } catch (CoreException e) {
      // we expect a core exception since the property is not registered.
      return;
    }
    fail("We expected a core exception since the property is not registered.");
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.