Java 8 UserPrincipalNotFoundException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 UserPrincipalNotFoundException class.

This code example shows how to use the following methods:getName
 
    try { 
      service.lookupPrincipalByGroupName("group");
      fail(); 
    } catch (UserPrincipalNotFoundException expected) {
      assertThat(expected.getName()).isEqualTo("group");
    } 
  } 
} 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getName
 
    try { 
      lookupService.lookupPrincipalByName("group");
      fail("lookup should fail"); 
    } catch (UserPrincipalNotFoundException e) {
      assertEquals("group", e.getName());
    } 
 
    UserPrincipal group = lookupService.lookupPrincipalByGroupName("group");
    assertEquals("grOup", group.getName());
    assertEquals(group,lookupService.lookupPrincipalByGroupName("GROUP"));
 
    try { 
      lookupService.lookupPrincipalByGroupName("user");
      fail("lookup should fail"); 
    } catch (UserPrincipalNotFoundException e) {
      assertEquals("user", e.getName());
    } 
  } 
 

3
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 UserPrincipalNotFoundException Methods: