@Test public void getIconSetNames() throws Exception { Query query = mock(Query.class); when(queryManager.createQuery("SELECT obj.name FROM Document doc, doc.object(IconThemesCode.IconThemeClass) obj" + " ORDER BY obj.name", Query.XWQL)).thenReturn(query); List<String> results = new ArrayList<>(); when(query.<String>execute()).thenReturn(results); assertTrue(results == mocker.getComponentUnderTest().getIconSetNames()); }
@Override public List<String> getIconSetNames() throws IconException { try { String xwql = "SELECT obj.name FROM Document doc, doc.object(IconThemesCode.IconThemeClass) obj " + "ORDER BY obj.name"; Query query = queryManager.createQuery(xwql, Query.XWQL); return query.execute(); } catch (QueryException e) { throw new IconException("Failed to get the name of all icon sets.", e); } }
DefaultIconSetManager implements IconSetManager { @Override public List<String> getIconSetNames() throws IconException { try { String xwql = "SELECT obj.name FROM Document doc, doc.object(IconThemesCode.IconThemeClass) obj " + "ORDER BY obj.name"; Query query = queryManager.createQuery(xwql, Query.XWQL); return query.execute(); } catch (QueryException e) { throw new IconException("Failed to get the name of all icon sets.", e); } } }
DefaultIconSetManager implements IconSetManager { @Override public List<String> getIconSetNames() throws IconException { try { String xwql = "SELECT obj.name FROM Document doc, doc.object(IconThemesCode.IconThemeClass) obj " + "ORDER BY obj.name"; Query query = queryManager.createQuery(xwql, Query.XWQL); return query.execute(); } catch (QueryException e) { throw new IconException("Failed to get the name of all icon sets.", e); } }  }
DefaultIconSetManager implements IconSetManager { @Override public List<String> getIconSetNames() throws IconException { try { String xwql = "SELECT obj.name FROM Document doc, doc.object(IconThemesCode.IconThemeClass) obj " + "ORDER BY obj.name"; Query query = queryManager.createQuery(xwql, Query.XWQL); return query.execute(); } catch (QueryException e) { throw new IconException("Failed to get the name of all icon sets.", e); } }  @Override IconSet getCurrentIconSet(); @Override IconSet getDefaultIconSet(); @Override IconSet getIconSet(String name); @Override List<String> getIconSetNames(); }
DefaultIconSetManager implements IconSetManager { @Override public List<String> getIconSetNames() throws IconException { try { String xwql = "SELECT obj.name FROM Document doc, doc.object(IconThemesCode.IconThemeClass) obj " + "ORDER BY obj.name"; Query query = queryManager.createQuery(xwql, Query.XWQL); return query.execute(); } catch (QueryException e) { throw new IconException("Failed to get the name of all icon sets.", e); } }  @Override IconSet getCurrentIconSet(); @Override IconSet getDefaultIconSet(); @Override IconSet getIconSet(String name); @Override List<String> getIconSetNames();  }