@Override public Group get(String identifier) throws SecurityManagementException { final GroupManager serviceImpl = getService(); return serviceImpl.get(identifier); }
protected void doLoad(String name) { clear(); // Call backend service. showLoadingBox(); userSystemManager.groups((Group o) -> { hideLoadingBox(); GroupEditorWorkflow.this.group = o; assert group != null; edit(); }, errorCallback).get(name); }
protected void doLoad(String name) { clear(); // Call backend service. showLoadingBox(); userSystemManager.groups((Group o) -> { hideLoadingBox(); GroupEditorWorkflow.this.group = o; assert group != null; edit(); }, errorCallback).get(name); }
@Test public void testSearchRoleNotExists() { GroupManager groupManager = mock(GroupManager.class); doAnswer(new Answer<Group>() { @Override public Group answer(InvocationOnMock invocationOnMock) throws Throwable { String name = (String) invocationOnMock.getArguments()[0]; Group g = mock(Group.class); when(g.getName()).thenReturn(name); return g; } }).when(groupManager).get(anyString()); doThrow(new GroupNotFoundException("admin")).when(groupManager).get("admin"); when(userSystemManager.groups()).thenReturn(groupManager); AbstractEntityManager.SearchResponse<Role> response = tested.search(new SearchRequestImpl("", 1, 10)); assertNotNull(response); int total = response.getTotal(); assertEquals(total, 3); boolean hasNextPage = response.hasNextPage(); assertEquals(hasNextPage, false); List<Role> results = response.getResults(); assertEquals(results.size(), 3); }
@Test public void testSearchRoleNotExists() { GroupManager groupManager = mock(GroupManager.class); doAnswer(new Answer<Group>() { @Override public Group answer(InvocationOnMock invocationOnMock) throws Throwable { String name = (String) invocationOnMock.getArguments()[0]; Group g = mock(Group.class); when(g.getName()).thenReturn(name); return g; } }).when(groupManager).get(anyString()); doThrow(new GroupNotFoundException("admin")).when(groupManager).get("admin"); when(userSystemManager.groups()).thenReturn(groupManager); AbstractEntityManager.SearchResponse<Role> response = tested.search(new SearchRequestImpl("", 1, 10)); assertNotNull(response); int total = response.getTotal(); assertEquals(total, 3); boolean hasNextPage = response.hasNextPage(); assertEquals(hasNextPage, false); List<Role> results = response.getResults(); assertEquals(results.size(), 3); }
@Test public void testSearch() { GroupManager groupManager = mock(GroupManager.class); doAnswer(new Answer<Group>() { @Override public Group answer(InvocationOnMock invocationOnMock) throws Throwable { String name = (String) invocationOnMock.getArguments()[0]; Group g = mock(Group.class); when(g.getName()).thenReturn(name); return g; } }).when(groupManager).get(anyString()); when(userSystemManager.groups()).thenReturn(groupManager); AbstractEntityManager.SearchResponse<Role> response = tested.search(new SearchRequestImpl("", 1, 10)); assertNotNull(response); int total = response.getTotal(); assertEquals(total, 3); boolean hasNextPage = response.hasNextPage(); assertEquals(hasNextPage, false); List<Role> results = response.getResults(); assertEquals(results.size(), 3); }
@Test public void testSearch() { GroupManager groupManager = mock(GroupManager.class); doAnswer(new Answer<Group>() { @Override public Group answer(InvocationOnMock invocationOnMock) throws Throwable { String name = (String) invocationOnMock.getArguments()[0]; Group g = mock(Group.class); when(g.getName()).thenReturn(name); return g; } }).when(groupManager).get(anyString()); when(userSystemManager.groups()).thenReturn(groupManager); AbstractEntityManager.SearchResponse<Role> response = tested.search(new SearchRequestImpl("", 1, 10)); assertNotNull(response); int total = response.getTotal(); assertEquals(total, 3); boolean hasNextPage = response.hasNextPage(); assertEquals(hasNextPage, false); List<Role> results = response.getResults(); assertEquals(results.size(), 3); }
}).get(identifier);
}).get(identifier);