@Test public void testSelectWorkspace() throws Throwable { RestInvocations.sprintService_getReleases(handler, 1005); handler.async(); restService.addServerTypeListener(new OneTimeServerTypeListener(handler, restService) { @Override protected void connectedToEvent(ServerType serverType) { Assert.assertEquals(ServerType.AGM, serverType); } }); try { workspaceService.selectWorkspace(1005, "Red"); handler.consume(); Assert.assertEquals(1005, (int) workspaceConfiguration.getWorkspaceId()); Assert.assertEquals(workspaceConfiguration.getWorkspaceName(), "Red"); } finally { workspaceConfiguration.setWorkspaceId(1000); } }
public void selectWorkspace(int id, String name) { if (!Integer.valueOf(id).equals(workspaceConfiguration.getWorkspaceId())) { workspaceConfiguration.setWorkspaceId(id); workspaceConfiguration.setWorkspaceName(name); restService.fireServerTypeEvent(); } }
WorkspaceService extends AbstractCachingEntityService<Void> { public void selectWorkspace(int id, String name) { if (!Integer.valueOf(id).equals(workspaceConfiguration.getWorkspaceId())) { workspaceConfiguration.setWorkspaceId(id); workspaceConfiguration.setWorkspaceName(name); restService.fireServerTypeEvent(); } } }
WorkspaceService extends AbstractCachingEntityService<Void> { public void selectWorkspace(int id, String name) { if (!Integer.valueOf(id).equals(workspaceConfiguration.getWorkspaceId())) { workspaceConfiguration.setWorkspaceId(id); workspaceConfiguration.setWorkspaceName(name); restService.fireServerTypeEvent(); } } WorkspaceService(Project project, EntityService entityService, RestService restService, WorkspaceConfiguration workspaceConfiguration); }
WorkspaceService extends AbstractCachingEntityService<Void> { public void selectWorkspace(int id, String name) { if (!Integer.valueOf(id).equals(workspaceConfiguration.getWorkspaceId())) { workspaceConfiguration.setWorkspaceId(id); workspaceConfiguration.setWorkspaceName(name); restService.fireServerTypeEvent(); } } WorkspaceService(Project project, EntityService entityService, RestService restService, WorkspaceConfiguration workspaceConfiguration); int getWorkspaceId(); String getWorkspaceName(); void selectWorkspace(int id, String name); Map<Integer, String> listWorkspaces(); void listWorkspacesAsync(Callback<Map<Integer, String>> callback); }
WorkspaceService extends AbstractCachingEntityService<Void> { public void selectWorkspace(int id, String name) { if (!Integer.valueOf(id).equals(workspaceConfiguration.getWorkspaceId())) { workspaceConfiguration.setWorkspaceId(id); workspaceConfiguration.setWorkspaceName(name); restService.fireServerTypeEvent(); } } WorkspaceService(Project project, EntityService entityService, RestService restService, WorkspaceConfiguration workspaceConfiguration); int getWorkspaceId(); String getWorkspaceName(); void selectWorkspace(int id, String name); Map<Integer, String> listWorkspaces(); void listWorkspacesAsync(Callback<Map<Integer, String>> callback);  }