target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void isAnchorChild_shouldReturnTrueIfCurrentRecordIsVolume() throws Exception { long iddoc = DataManager.getInstance().getSearchIndex().getIddocFromIdentifier("306653648_1891"); Assert.assertNotEquals(-1, iddoc); StructElement element = new StructElement(iddoc); Assert.assertTrue(element.isAnchorChild()); ...
public boolean isAnchorChild() throws IndexUnreachableException { if (isWork() && isHasParent()) { return true; } return false; }
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isAnchorChild() throws IndexUnreachableException { if (isWork() && isHasParent()) { return true; } return false; } }
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isAnchorChild() throws IndexUnreachableException { if (isWork() && isHasParent()) { return true; } return false; } StructElement(); StructElement(long luceneId); StructElement(long luceneId, SolrDocument do...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isAnchorChild() throws IndexUnreachableException { if (isWork() && isHasParent()) { return true; } return false; } StructElement(); StructElement(long luceneId); StructElement(long luceneId, SolrDocument do...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isAnchorChild() throws IndexUnreachableException { if (isWork() && isHasParent()) { return true; } return false; } StructElement(); StructElement(long luceneId); StructElement(long luceneId, SolrDocument do...
@Test public void canSatisfyAllAccessConditions_shouldReturnTrueIfConditionIsOpenAccess() throws Exception { IpRange ipRange = new IpRange(); Assert.assertTrue(ipRange.canSatisfyAllAccessConditions(new HashSet<>(Collections.singletonList(SolrConstants.OPEN_ACCESS_VALUE)), null, IPrivilegeHolder.PRIV_LIST, "PPN123")); }
public boolean canSatisfyAllAccessConditions(Set<String> conditionList, List<LicenseType> licenseTypes, String privilegeName, String pi) throws PresentationException, IndexUnreachableException, DAOException { if (AccessConditionUtils.isFreeOpenAccess(conditionList, licenseTypes)) { return true; } Map<String, Boolean> p...
IpRange implements ILicensee, Serializable { public boolean canSatisfyAllAccessConditions(Set<String> conditionList, List<LicenseType> licenseTypes, String privilegeName, String pi) throws PresentationException, IndexUnreachableException, DAOException { if (AccessConditionUtils.isFreeOpenAccess(conditionList, licenseTy...
IpRange implements ILicensee, Serializable { public boolean canSatisfyAllAccessConditions(Set<String> conditionList, List<LicenseType> licenseTypes, String privilegeName, String pi) throws PresentationException, IndexUnreachableException, DAOException { if (AccessConditionUtils.isFreeOpenAccess(conditionList, licenseTy...
IpRange implements ILicensee, Serializable { public boolean canSatisfyAllAccessConditions(Set<String> conditionList, List<LicenseType> licenseTypes, String privilegeName, String pi) throws PresentationException, IndexUnreachableException, DAOException { if (AccessConditionUtils.isFreeOpenAccess(conditionList, licenseTy...
IpRange implements ILicensee, Serializable { public boolean canSatisfyAllAccessConditions(Set<String> conditionList, List<LicenseType> licenseTypes, String privilegeName, String pi) throws PresentationException, IndexUnreachableException, DAOException { if (AccessConditionUtils.isFreeOpenAccess(conditionList, licenseTy...
@Test public void createFilterQuery_joinedTableAndField() throws Exception { Map<String, String> filters = Collections.singletonMap("B_c-C", "bar"); Map<String, String> params = new HashMap<>(); String expectedFilterString = " LEFT JOIN a.c b WHERE (UPPER(a.B) LIKE :BcC OR UPPER(b.C) LIKE :BcC)"; String filterString = ...
static String createFilterQuery2(String staticFilterQuery, Map<String, String> filters, Map<String, String> params) { StringBuilder q = new StringBuilder(" "); Map<String, String> tableKeys = new HashMap<>(); if (StringUtils.isNotEmpty(staticFilterQuery)) { q.append(staticFilterQuery); } if (filters != null && !filters...
JPADAO implements IDAO { static String createFilterQuery2(String staticFilterQuery, Map<String, String> filters, Map<String, String> params) { StringBuilder q = new StringBuilder(" "); Map<String, String> tableKeys = new HashMap<>(); if (StringUtils.isNotEmpty(staticFilterQuery)) { q.append(staticFilterQuery); } if (fi...
JPADAO implements IDAO { static String createFilterQuery2(String staticFilterQuery, Map<String, String> filters, Map<String, String> params) { StringBuilder q = new StringBuilder(" "); Map<String, String> tableKeys = new HashMap<>(); if (StringUtils.isNotEmpty(staticFilterQuery)) { q.append(staticFilterQuery); } if (fi...
JPADAO implements IDAO { static String createFilterQuery2(String staticFilterQuery, Map<String, String> filters, Map<String, String> params) { StringBuilder q = new StringBuilder(" "); Map<String, String> tableKeys = new HashMap<>(); if (StringUtils.isNotEmpty(staticFilterQuery)) { q.append(staticFilterQuery); } if (fi...
JPADAO implements IDAO { static String createFilterQuery2(String staticFilterQuery, Map<String, String> filters, Map<String, String> params) { StringBuilder q = new StringBuilder(" "); Map<String, String> tableKeys = new HashMap<>(); if (StringUtils.isNotEmpty(staticFilterQuery)) { q.append(staticFilterQuery); } if (fi...
@Test public void testGetTermsOfUse() throws DAOException { TermsOfUse tou = DataManager.getInstance().getDao().getTermsOfUse(); Assert.assertNotNull(tou); }
@Override public TermsOfUse getTermsOfUse() throws DAOException { preQuery(); Query q = em.createQuery("SELECT u FROM TermsOfUse u"); List results = q.getResultList(); if(results.isEmpty()) { return new TermsOfUse(); } else { return (TermsOfUse) results.get(0); } }
JPADAO implements IDAO { @Override public TermsOfUse getTermsOfUse() throws DAOException { preQuery(); Query q = em.createQuery("SELECT u FROM TermsOfUse u"); List results = q.getResultList(); if(results.isEmpty()) { return new TermsOfUse(); } else { return (TermsOfUse) results.get(0); } } }
JPADAO implements IDAO { @Override public TermsOfUse getTermsOfUse() throws DAOException { preQuery(); Query q = em.createQuery("SELECT u FROM TermsOfUse u"); List results = q.getResultList(); if(results.isEmpty()) { return new TermsOfUse(); } else { return (TermsOfUse) results.get(0); } } JPADAO(); JPADAO(String inPe...
JPADAO implements IDAO { @Override public TermsOfUse getTermsOfUse() throws DAOException { preQuery(); Query q = em.createQuery("SELECT u FROM TermsOfUse u"); List results = q.getResultList(); if(results.isEmpty()) { return new TermsOfUse(); } else { return (TermsOfUse) results.get(0); } } JPADAO(); JPADAO(String inPe...
JPADAO implements IDAO { @Override public TermsOfUse getTermsOfUse() throws DAOException { preQuery(); Query q = em.createQuery("SELECT u FROM TermsOfUse u"); List results = q.getResultList(); if(results.isEmpty()) { return new TermsOfUse(); } else { return (TermsOfUse) results.get(0); } } JPADAO(); JPADAO(String inPe...
@Test public void testIsTermsOfUseActive() throws DAOException { boolean active = DataManager.getInstance().getDao().isTermsOfUseActive(); Assert.assertFalse(active); }
@Override public boolean isTermsOfUseActive() throws DAOException { preQuery(); Query q = em.createQuery("SELECT u.active FROM TermsOfUse u"); List results = q.getResultList(); if(results.isEmpty()) { return false; } else { return (boolean) results.get(0); } }
JPADAO implements IDAO { @Override public boolean isTermsOfUseActive() throws DAOException { preQuery(); Query q = em.createQuery("SELECT u.active FROM TermsOfUse u"); List results = q.getResultList(); if(results.isEmpty()) { return false; } else { return (boolean) results.get(0); } } }
JPADAO implements IDAO { @Override public boolean isTermsOfUseActive() throws DAOException { preQuery(); Query q = em.createQuery("SELECT u.active FROM TermsOfUse u"); List results = q.getResultList(); if(results.isEmpty()) { return false; } else { return (boolean) results.get(0); } } JPADAO(); JPADAO(String inPersist...
JPADAO implements IDAO { @Override public boolean isTermsOfUseActive() throws DAOException { preQuery(); Query q = em.createQuery("SELECT u.active FROM TermsOfUse u"); List results = q.getResultList(); if(results.isEmpty()) { return false; } else { return (boolean) results.get(0); } } JPADAO(); JPADAO(String inPersist...
JPADAO implements IDAO { @Override public boolean isTermsOfUseActive() throws DAOException { preQuery(); Query q = em.createQuery("SELECT u.active FROM TermsOfUse u"); List results = q.getResultList(); if(results.isEmpty()) { return false; } else { return (boolean) results.get(0); } } JPADAO(); JPADAO(String inPersist...
@Test public void testSaveTermsOfUse() throws DAOException { Assert.assertFalse(DataManager.getInstance().getDao().isTermsOfUseActive()); TermsOfUse tou = new TermsOfUse(); tou.setActive(true); DataManager.getInstance().getDao().saveTermsOfUse(tou); Assert.assertTrue(DataManager.getInstance().getDao().isTermsOfUseActiv...
@Override public boolean saveTermsOfUse(TermsOfUse tou) throws DAOException { preQuery(); EntityManager em = factory.createEntityManager(); try { em.getTransaction().begin(); if(tou.getId() == null) { em.persist(tou); } else { em.merge(tou); } em.getTransaction().commit(); tou = this.em.getReference(TermsOfUse.class, t...
JPADAO implements IDAO { @Override public boolean saveTermsOfUse(TermsOfUse tou) throws DAOException { preQuery(); EntityManager em = factory.createEntityManager(); try { em.getTransaction().begin(); if(tou.getId() == null) { em.persist(tou); } else { em.merge(tou); } em.getTransaction().commit(); tou = this.em.getRefe...
JPADAO implements IDAO { @Override public boolean saveTermsOfUse(TermsOfUse tou) throws DAOException { preQuery(); EntityManager em = factory.createEntityManager(); try { em.getTransaction().begin(); if(tou.getId() == null) { em.persist(tou); } else { em.merge(tou); } em.getTransaction().commit(); tou = this.em.getRefe...
JPADAO implements IDAO { @Override public boolean saveTermsOfUse(TermsOfUse tou) throws DAOException { preQuery(); EntityManager em = factory.createEntityManager(); try { em.getTransaction().begin(); if(tou.getId() == null) { em.persist(tou); } else { em.merge(tou); } em.getTransaction().commit(); tou = this.em.getRefe...
JPADAO implements IDAO { @Override public boolean saveTermsOfUse(TermsOfUse tou) throws DAOException { preQuery(); EntityManager em = factory.createEntityManager(); try { em.getTransaction().begin(); if(tou.getId() == null) { em.persist(tou); } else { em.merge(tou); } em.getTransaction().commit(); tou = this.em.getRefe...
@Test public void testResetUserAgreementsToTermsOfUse() throws DAOException { List<User> users = DataManager.getInstance().getDao().getAllUsers(true); Assert.assertTrue(users.stream().allMatch(u -> !u.isAgreedToTermsOfUse())); for (User user : users) { user.setAgreedToTermsOfUse(true); DataManager.getInstance().getDao(...
@Override public boolean resetUserAgreementsToTermsOfUse() throws DAOException { List<User> users = getAllUsers(true); users.forEach(u -> u.setAgreedToTermsOfUse(false)); users.forEach(u -> { try { updateUser(u); } catch (DAOException e) { logger.error("Error resetting user agreement for user " + u, e); } }); return tr...
JPADAO implements IDAO { @Override public boolean resetUserAgreementsToTermsOfUse() throws DAOException { List<User> users = getAllUsers(true); users.forEach(u -> u.setAgreedToTermsOfUse(false)); users.forEach(u -> { try { updateUser(u); } catch (DAOException e) { logger.error("Error resetting user agreement for user "...
JPADAO implements IDAO { @Override public boolean resetUserAgreementsToTermsOfUse() throws DAOException { List<User> users = getAllUsers(true); users.forEach(u -> u.setAgreedToTermsOfUse(false)); users.forEach(u -> { try { updateUser(u); } catch (DAOException e) { logger.error("Error resetting user agreement for user "...
JPADAO implements IDAO { @Override public boolean resetUserAgreementsToTermsOfUse() throws DAOException { List<User> users = getAllUsers(true); users.forEach(u -> u.setAgreedToTermsOfUse(false)); users.forEach(u -> { try { updateUser(u); } catch (DAOException e) { logger.error("Error resetting user agreement for user "...
JPADAO implements IDAO { @Override public boolean resetUserAgreementsToTermsOfUse() throws DAOException { List<User> users = getAllUsers(true); users.forEach(u -> u.setAgreedToTermsOfUse(false)); users.forEach(u -> { try { updateUser(u); } catch (DAOException e) { logger.error("Error resetting user agreement for user "...
@Test public void testAddCategoriesToPages() throws DAOException { update.convertData(); CMSPage page = update.pages.stream().filter(p -> p.getId().equals(2l)).findFirst().get(); Assert.assertEquals(2, page.getCategories().size()); Assert.assertEquals("categoryb", page.getCategories().get(0).getName()); Assert.assertEq...
public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } if (!this.entityMap.containsKey("media") && ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
@Test public void testAddCategoriesToMedia() throws DAOException { update.convertData(); CMSMediaItem media = update.media.stream().filter(p -> p.getId().equals(1l)).findFirst().get(); Assert.assertEquals(1, media.getCategories().size()); Assert.assertEquals("categoryd", media.getCategories().get(0).getName()); }
public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } if (!this.entityMap.containsKey("media") && ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
@Test public void testAddCategoriesToContent() throws DAOException { update.convertData(); CMSContentItem content = update.content.stream().filter(p -> p.getId().equals(3l)).findFirst().get(); Assert.assertEquals(1, content.getCategories().size()); Assert.assertEquals("categoryd", content.getCategories().get(0).getName...
public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } if (!this.entityMap.containsKey("media") && ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
CMSCategoryUpdate implements IModelUpdate { public boolean convertData() throws DAOException { if (this.entityMap == null || this.media == null || this.pages == null || this.content == null || this.categories == null) { throw new IllegalStateException("Must successfully run loadData() before calling convertData()"); } ...
@Test public void testCreateCategories() throws DAOException { update.convertData(); Assert.assertEquals(5, update.categories.size()); Assert.assertTrue(update.categories.stream().anyMatch(cat -> cat.getName().equals("categoryc"))); }
protected List<CMSCategory> createCategories(Map<String, Map<String, List<Long>>> entityMap) { return entityMap.values() .stream() .flatMap(map -> map.keySet().stream()) .flatMap(name -> Arrays.stream(name.split(CLASSIFICATION_SEPARATOR_REGEX))) .filter(name -> StringUtils.isNotBlank(name)) .filter(name -> !name.equals...
CMSCategoryUpdate implements IModelUpdate { protected List<CMSCategory> createCategories(Map<String, Map<String, List<Long>>> entityMap) { return entityMap.values() .stream() .flatMap(map -> map.keySet().stream()) .flatMap(name -> Arrays.stream(name.split(CLASSIFICATION_SEPARATOR_REGEX))) .filter(name -> StringUtils.is...
CMSCategoryUpdate implements IModelUpdate { protected List<CMSCategory> createCategories(Map<String, Map<String, List<Long>>> entityMap) { return entityMap.values() .stream() .flatMap(map -> map.keySet().stream()) .flatMap(name -> Arrays.stream(name.split(CLASSIFICATION_SEPARATOR_REGEX))) .filter(name -> StringUtils.is...
CMSCategoryUpdate implements IModelUpdate { protected List<CMSCategory> createCategories(Map<String, Map<String, List<Long>>> entityMap) { return entityMap.values() .stream() .flatMap(map -> map.keySet().stream()) .flatMap(name -> Arrays.stream(name.split(CLASSIFICATION_SEPARATOR_REGEX))) .filter(name -> StringUtils.is...
CMSCategoryUpdate implements IModelUpdate { protected List<CMSCategory> createCategories(Map<String, Map<String, List<Long>>> entityMap) { return entityMap.values() .stream() .flatMap(map -> map.keySet().stream()) .flatMap(name -> Arrays.stream(name.split(CLASSIFICATION_SEPARATOR_REGEX))) .filter(name -> StringUtils.is...
@Test public void isRestrictedUri_shouldReturnTrueForCertainPrettyUris() throws Exception { Assert.assertTrue(LoginFilter.isRestrictedUri("/myactivity/")); Assert.assertTrue(LoginFilter.isRestrictedUri("/mysearches/")); Assert.assertTrue(LoginFilter.isRestrictedUri("/user/bookmarks/show")); Assert.assertTrue(LoginFilte...
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void isAnchorChild_shouldReturnFalseIfCurrentRecordIsNotVolume() throws Exception { StructElement element = new StructElement(iddocKleiuniv); Assert.assertFalse(element.isAnchorChild()); }
public boolean isAnchorChild() throws IndexUnreachableException { if (isWork() && isHasParent()) { return true; } return false; }
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isAnchorChild() throws IndexUnreachableException { if (isWork() && isHasParent()) { return true; } return false; } }
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isAnchorChild() throws IndexUnreachableException { if (isWork() && isHasParent()) { return true; } return false; } StructElement(); StructElement(long luceneId); StructElement(long luceneId, SolrDocument do...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isAnchorChild() throws IndexUnreachableException { if (isWork() && isHasParent()) { return true; } return false; } StructElement(); StructElement(long luceneId); StructElement(long luceneId, SolrDocument do...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isAnchorChild() throws IndexUnreachableException { if (isWork() && isHasParent()) { return true; } return false; } StructElement(); StructElement(long luceneId); StructElement(long luceneId, SolrDocument do...
@Test public void isRestrictedUri_shouldReturnTrueForCrowdsourcingUris() throws Exception { Assert.assertTrue(LoginFilter.isRestrictedUri("/crowdMyAss/")); }
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void isRestrictedUri_shouldReturnFalseForCrowdsourcingAboutPage() throws Exception { Assert.assertFalse(LoginFilter.isRestrictedUri("/crowdsourcing/about.xhtml")); }
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void isRestrictedUri_shouldReturnTrueForAdminUris() throws Exception { Assert.assertTrue(LoginFilter.isRestrictedUri("/adminMyAss.xhtml")); }
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void isRestrictedUri_shouldReturnTrueForUserBackendUris() throws Exception { Assert.assertTrue(LoginFilter.isRestrictedUri("/userBackendSlap.xhtml")); }
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void isRestrictedUri_shouldReturnTrueForUserBookmarksUris() throws Exception { Assert.assertTrue(LoginFilter.isRestrictedUri("/viewer/user/bookmarks/etc")); }
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void isRestrictedUri_shouldReturnFalseForBookmarksListUri() throws Exception { Assert.assertFalse(LoginFilter.isRestrictedUri("/bookmarks")); }
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void isRestrictedUri_shouldReturnFalseForBookmarksSessionUris() throws Exception { Assert.assertFalse(LoginFilter.isRestrictedUri("/bookmarks/session/foo")); }
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void isRestrictedUri_shouldReturnFalseForBookmarksShareKeyUris() throws Exception { Assert.assertFalse(LoginFilter.isRestrictedUri("/bookmarks/key/somesharekey/")); }
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void isRestrictedUri_shouldReturnFalseForBookmarksSendListUris() throws Exception { Assert.assertFalse(LoginFilter.isRestrictedUri("/bookmarks/send/")); }
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void isRestrictedUri_shouldReturnFalseForUserAccountActivationUris() throws Exception { Assert.assertFalse(LoginFilter.isRestrictedUri("/user/activate/foo@bar.com/abcde/")); }
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void getImageUrl_shouldConstructUrlCorrectly() throws Exception { StructElement element = new StructElement(iddocKleiuniv); Assert.assertEquals(ConfigurationTest.APPLICATION_ROOT_URL + "api/v1/records/" + PI_KLEIUNIV + "/files/images/00000001.tif/full/!600,800/0/default.jpg", element.getImageUrl(600, 800))...
public String getImageUrl(int width, int height) throws ViewerConfigurationException { String filename = getMetadataValue(SolrConstants.THUMBNAIL); if (filename != null) { return BeanUtils.getImageDeliveryBean().getThumbs().getThumbnailUrl(this, width, height); } return null; }
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getImageUrl(int width, int height) throws ViewerConfigurationException { String filename = getMetadataValue(SolrConstants.THUMBNAIL); if (filename != null) { return BeanUtils.getImageDeliveryBean().getThumbs()...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getImageUrl(int width, int height) throws ViewerConfigurationException { String filename = getMetadataValue(SolrConstants.THUMBNAIL); if (filename != null) { return BeanUtils.getImageDeliveryBean().getThumbs()...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getImageUrl(int width, int height) throws ViewerConfigurationException { String filename = getMetadataValue(SolrConstants.THUMBNAIL); if (filename != null) { return BeanUtils.getImageDeliveryBean().getThumbs()...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getImageUrl(int width, int height) throws ViewerConfigurationException { String filename = getMetadataValue(SolrConstants.THUMBNAIL); if (filename != null) { return BeanUtils.getImageDeliveryBean().getThumbs()...
@Test public void isRestrictedUri_shouldReturnFalseForUserPasswordResetUris() throws Exception { Assert.assertFalse(LoginFilter.isRestrictedUri("/user/resetpw/foo@bar.com/abcde/")); }
public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.startsWith("/user/activate/")) { ...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
LoginFilter implements Filter { public static boolean isRestrictedUri(String uri) { if (uri == null) { return false; } if (uri.matches("/?viewer/.*")) { uri = uri.replaceAll("/?viewer/", "/"); } logger.trace("uri: {}", uri); switch (uri.trim()) { case "/myactivity/": case "/mysearches/": return true; default: if (uri.s...
@Test public void getInfo_shouldExtractFieldsCorrectly() throws Exception { Assert.assertEquals("20.01", Version.getInfo("Public-Version", MANIFEST)); Assert.assertEquals("Apache Maven", Version.getInfo("Created-By", MANIFEST)); Assert.assertEquals("2020-01-15 18:30", Version.getInfo("Implementation-Build-Date", MANIFE...
static String getInfo(String label, String infoText) { String regex = label + ": *(.*)"; Matcher matcher = Pattern.compile(regex).matcher(infoText); if (matcher.find()) { return matcher.group(1); } return "?"; }
Version { static String getInfo(String label, String infoText) { String regex = label + ": *(.*)"; Matcher matcher = Pattern.compile(regex).matcher(infoText); if (matcher.find()) { return matcher.group(1); } return "?"; } }
Version { static String getInfo(String label, String infoText) { String regex = label + ": *(.*)"; Matcher matcher = Pattern.compile(regex).matcher(infoText); if (matcher.find()) { return matcher.group(1); } return "?"; } }
Version { static String getInfo(String label, String infoText) { String regex = label + ": *(.*)"; Matcher matcher = Pattern.compile(regex).matcher(infoText); if (matcher.find()) { return matcher.group(1); } return "?"; } @Deprecated static String getBuildDate(String pattern); @Deprecated static String convertDate(Str...
Version { static String getInfo(String label, String infoText) { String regex = label + ": *(.*)"; Matcher matcher = Pattern.compile(regex).matcher(infoText); if (matcher.find()) { return matcher.group(1); } return "?"; } @Deprecated static String getBuildDate(String pattern); @Deprecated static String convertDate(Str...
@Test public void getTopStruct_shouldRetrieveTopStructCorrectly() throws Exception { long iddoc = DataManager.getInstance().getSearchIndex().getIddocByLogid(PI_KLEIUNIV, "LOG_0002"); Assert.assertNotEquals(-1, iddoc); StructElement element = new StructElement(iddoc); StructElement topStruct = element.getTopStruct(); As...
public StructElement getTopStruct() throws PresentationException, IndexUnreachableException { if (work || anchor) { this.topStruct = this; return this; } if (this.topStruct == null) { String topstructIddoc = getMetadataValue(SolrConstants.IDDOC_TOPSTRUCT); try { if (topstructIddoc != null) { this.topStruct = new Struct...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public StructElement getTopStruct() throws PresentationException, IndexUnreachableException { if (work || anchor) { this.topStruct = this; return this; } if (this.topStruct == null) { String topstructIddoc = getMetadataValu...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public StructElement getTopStruct() throws PresentationException, IndexUnreachableException { if (work || anchor) { this.topStruct = this; return this; } if (this.topStruct == null) { String topstructIddoc = getMetadataValu...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public StructElement getTopStruct() throws PresentationException, IndexUnreachableException { if (work || anchor) { this.topStruct = this; return this; } if (this.topStruct == null) { String topstructIddoc = getMetadataValu...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public StructElement getTopStruct() throws PresentationException, IndexUnreachableException { if (work || anchor) { this.topStruct = this; return this; } if (this.topStruct == null) { String topstructIddoc = getMetadataValu...
@Test public void getTopStruct_shouldReturnSelfIfTopstructOrAnchor() throws Exception { StructElement element = new StructElement(iddocKleiuniv); StructElement topStruct = element.getTopStruct(); Assert.assertEquals(element, topStruct); Assert.assertEquals(iddocKleiuniv, topStruct.getLuceneId()); }
public StructElement getTopStruct() throws PresentationException, IndexUnreachableException { if (work || anchor) { this.topStruct = this; return this; } if (this.topStruct == null) { String topstructIddoc = getMetadataValue(SolrConstants.IDDOC_TOPSTRUCT); try { if (topstructIddoc != null) { this.topStruct = new Struct...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public StructElement getTopStruct() throws PresentationException, IndexUnreachableException { if (work || anchor) { this.topStruct = this; return this; } if (this.topStruct == null) { String topstructIddoc = getMetadataValu...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public StructElement getTopStruct() throws PresentationException, IndexUnreachableException { if (work || anchor) { this.topStruct = this; return this; } if (this.topStruct == null) { String topstructIddoc = getMetadataValu...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public StructElement getTopStruct() throws PresentationException, IndexUnreachableException { if (work || anchor) { this.topStruct = this; return this; } if (this.topStruct == null) { String topstructIddoc = getMetadataValu...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public StructElement getTopStruct() throws PresentationException, IndexUnreachableException { if (work || anchor) { this.topStruct = this; return this; } if (this.topStruct == null) { String topstructIddoc = getMetadataValu...
@Test public void getFirstVolumeFieldValue_shouldReturnCorrectValue() throws Exception { SolrDocument doc = DataManager.getInstance().getSearchIndex().getFirstDoc(SolrConstants.PI + ":306653648", null); Assert.assertNotNull(doc); StructElement element = new StructElement(Long.valueOf((String) doc.getFieldValue(SolrCons...
public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument docParent = DataManager.getInstance() .getSearchIndex() .getFirstDoc(new StringBuilder(SolrConstan...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
@Test public void getFirstVolumeFieldValue_shouldReturnNullIfStructElementNotAnchor() throws Exception { StructElement element = new StructElement(1387459017772L); Assert.assertNull(element.getFirstVolumeFieldValue(SolrConstants.MIMETYPE)); }
public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument docParent = DataManager.getInstance() .getSearchIndex() .getFirstDoc(new StringBuilder(SolrConstan...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
@Test(expected = IllegalArgumentException.class) public void getFirstVolumeFieldValue_shouldThrowIllegalArgumentExceptionIfFieldIsNull() throws Exception { StructElement element = new StructElement(1387459017772L); Assert.assertNull(element.getFirstVolumeFieldValue(null)); }
public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument docParent = DataManager.getInstance() .getSearchIndex() .getFirstDoc(new StringBuilder(SolrConstan...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getFirstVolumeFieldValue(String field) throws PresentationException, IndexUnreachableException { if (field == null) { throw new IllegalArgumentException("field may not be null"); } if (anchor) { SolrDocument d...
@Test public void isHasChildren_shouldReturnTrueIfElementHasChildren() throws Exception { StructElement element = new StructElement(iddocKleiuniv); Assert.assertTrue(element.isHasChildren()); }
public boolean isHasChildren() throws IndexUnreachableException, PresentationException { if (hasChildren == null) { if (DataManager.getInstance() .getSearchIndex() .getHitCount(new StringBuilder(SolrConstants.IDDOC_PARENT).append(':').append(luceneId).toString()) > 0) { hasChildren = true; } else { hasChildren = false;...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isHasChildren() throws IndexUnreachableException, PresentationException { if (hasChildren == null) { if (DataManager.getInstance() .getSearchIndex() .getHitCount(new StringBuilder(SolrConstants.IDDOC_PARENT)....
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isHasChildren() throws IndexUnreachableException, PresentationException { if (hasChildren == null) { if (DataManager.getInstance() .getSearchIndex() .getHitCount(new StringBuilder(SolrConstants.IDDOC_PARENT)....
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isHasChildren() throws IndexUnreachableException, PresentationException { if (hasChildren == null) { if (DataManager.getInstance() .getSearchIndex() .getHitCount(new StringBuilder(SolrConstants.IDDOC_PARENT)....
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public boolean isHasChildren() throws IndexUnreachableException, PresentationException { if (hasChildren == null) { if (DataManager.getInstance() .getSearchIndex() .getHitCount(new StringBuilder(SolrConstants.IDDOC_PARENT)....
@Test public void getGroupLabel_shouldReturnAltValueOfNoLabelWasFound() throws Exception { StructElement element = new StructElement(1L); Assert.assertEquals("alt", element.getGroupLabel("id10T", "alt")); }
public String getGroupLabel(String groupIdentifier, String altValue) throws IndexUnreachableException { if (groupIdentifier == null) { throw new IllegalArgumentException("groupIdentifier may not be null"); } if (groupLabels.get(groupIdentifier) == null) { try { SolrDocument doc = DataManager.getInstance() .getSearchInd...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getGroupLabel(String groupIdentifier, String altValue) throws IndexUnreachableException { if (groupIdentifier == null) { throw new IllegalArgumentException("groupIdentifier may not be null"); } if (groupLabels...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getGroupLabel(String groupIdentifier, String altValue) throws IndexUnreachableException { if (groupIdentifier == null) { throw new IllegalArgumentException("groupIdentifier may not be null"); } if (groupLabels...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getGroupLabel(String groupIdentifier, String altValue) throws IndexUnreachableException { if (groupIdentifier == null) { throw new IllegalArgumentException("groupIdentifier may not be null"); } if (groupLabels...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { public String getGroupLabel(String groupIdentifier, String altValue) throws IndexUnreachableException { if (groupIdentifier == null) { throw new IllegalArgumentException("groupIdentifier may not be null"); } if (groupLabels...
@Test public void getPi_shouldReturnPiIfTopstruct() throws Exception { StructElement element = new StructElement(iddocKleiuniv); Assert.assertEquals(PI_KLEIUNIV, element.getPi()); }
@Override public String getPi() { if (pi != null && !pi.equals("null")) { return pi; } else if (getMetadataValue(SolrConstants.PI_TOPSTRUCT) != null) { pi = getMetadataValue(SolrConstants.PI_TOPSTRUCT); return pi; } else if (!work && !anchor) { try { return Optional.ofNullable(this.getTopStruct()).map(StructElement::ge...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { @Override public String getPi() { if (pi != null && !pi.equals("null")) { return pi; } else if (getMetadataValue(SolrConstants.PI_TOPSTRUCT) != null) { pi = getMetadataValue(SolrConstants.PI_TOPSTRUCT); return pi; } else if...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { @Override public String getPi() { if (pi != null && !pi.equals("null")) { return pi; } else if (getMetadataValue(SolrConstants.PI_TOPSTRUCT) != null) { pi = getMetadataValue(SolrConstants.PI_TOPSTRUCT); return pi; } else if...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { @Override public String getPi() { if (pi != null && !pi.equals("null")) { return pi; } else if (getMetadataValue(SolrConstants.PI_TOPSTRUCT) != null) { pi = getMetadataValue(SolrConstants.PI_TOPSTRUCT); return pi; } else if...
StructElement extends StructElementStub implements Comparable<StructElementStub>, Serializable { @Override public String getPi() { if (pi != null && !pi.equals("null")) { return pi; } else if (getMetadataValue(SolrConstants.PI_TOPSTRUCT) != null) { pi = getMetadataValue(SolrConstants.PI_TOPSTRUCT); return pi; } else if...
@Test public void canSatisfyAllAccessConditions_shouldReturnTrueIfIpRangeHasLicense() throws Exception { IpRange ipRange = DataManager.getInstance().getDao().getIpRange(1); Assert.assertNotNull(ipRange); List<String> licences = Arrays.asList(new String[] { "license type 3 name", "restriction on access" }); Assert.asser...
public boolean canSatisfyAllAccessConditions(Set<String> conditionList, List<LicenseType> licenseTypes, String privilegeName, String pi) throws PresentationException, IndexUnreachableException, DAOException { if (AccessConditionUtils.isFreeOpenAccess(conditionList, licenseTypes)) { return true; } Map<String, Boolean> p...
IpRange implements ILicensee, Serializable { public boolean canSatisfyAllAccessConditions(Set<String> conditionList, List<LicenseType> licenseTypes, String privilegeName, String pi) throws PresentationException, IndexUnreachableException, DAOException { if (AccessConditionUtils.isFreeOpenAccess(conditionList, licenseTy...
IpRange implements ILicensee, Serializable { public boolean canSatisfyAllAccessConditions(Set<String> conditionList, List<LicenseType> licenseTypes, String privilegeName, String pi) throws PresentationException, IndexUnreachableException, DAOException { if (AccessConditionUtils.isFreeOpenAccess(conditionList, licenseTy...
IpRange implements ILicensee, Serializable { public boolean canSatisfyAllAccessConditions(Set<String> conditionList, List<LicenseType> licenseTypes, String privilegeName, String pi) throws PresentationException, IndexUnreachableException, DAOException { if (AccessConditionUtils.isFreeOpenAccess(conditionList, licenseTy...
IpRange implements ILicensee, Serializable { public boolean canSatisfyAllAccessConditions(Set<String> conditionList, List<LicenseType> licenseTypes, String privilegeName, String pi) throws PresentationException, IndexUnreachableException, DAOException { if (AccessConditionUtils.isFreeOpenAccess(conditionList, licenseTy...
@Test public void testDebugger() throws Exception { ObjectMapper mapper = new ObjectMapper(new YAMLFactory()); InputStream yaml = getClass().getResourceAsStream( "/yaml/templateDebugger.yml"); TemplateDebugger debugger = mapper.readValue(yaml, TemplateDebugger.class); assertNotNull(debugger); String rendered = debugger...
public String render() { STGroupFile templateGroup = new STGroupFile(templateGroupFile); ST template = templateGroup.getInstanceOf(templateName); if (template == null) { throw new IllegalStateException( String.format( "The template named [%s] does not exist in the template group [%s]", templateName, templateGroupFile))...
TemplateDebugger { public String render() { STGroupFile templateGroup = new STGroupFile(templateGroupFile); ST template = templateGroup.getInstanceOf(templateName); if (template == null) { throw new IllegalStateException( String.format( "The template named [%s] does not exist in the template group [%s]", templateName, ...
TemplateDebugger { public String render() { STGroupFile templateGroup = new STGroupFile(templateGroupFile); ST template = templateGroup.getInstanceOf(templateName); if (template == null) { throw new IllegalStateException( String.format( "The template named [%s] does not exist in the template group [%s]", templateName, ...
TemplateDebugger { public String render() { STGroupFile templateGroup = new STGroupFile(templateGroupFile); ST template = templateGroup.getInstanceOf(templateName); if (template == null) { throw new IllegalStateException( String.format( "The template named [%s] does not exist in the template group [%s]", templateName, ...
TemplateDebugger { public String render() { STGroupFile templateGroup = new STGroupFile(templateGroupFile); ST template = templateGroup.getInstanceOf(templateName); if (template == null) { throw new IllegalStateException( String.format( "The template named [%s] does not exist in the template group [%s]", templateName, ...
@Test public void states_should_observeInitialState() { Store<Integer> store = new Store<>(0); TestSubscriber<Integer> testSubscriber = new TestSubscriber<>(); states(store).subscribe(testSubscriber); testSubscriber.assertNoTerminalEvent(); testSubscriber.assertValue(0); }
public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
@Test public void states_should_observeStateChanges() { Store<Integer> store = new Store<>(0); TestObserver<Integer> testSubscriber = new TestObserver<>(); states(store).subscribe(testSubscriber); store.dispatch(integer -> integer + 1); testSubscriber.assertNotComplete(); testSubscriber.assertValues(0, 1); }
public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
@Test public void states_should_stopObservingStateChanges() { Store<Integer> store = new Store<>(0); TestObserver<Integer> testSubscriber = new TestObserver<>(); states(store).subscribe(testSubscriber); testSubscriber.dispose(); store.dispatch(integer -> integer + 1); final Integer state = store.getState(); testSubscri...
public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
@Test public void states_should_unsubscribeListener() { Store<Integer> mockStore = createMock(Store.class); mockStore.subscribe(anyObject()); mockStore.unsubscribe(anyObject()); replay(mockStore); states(mockStore).subscribe().dispose(); verify(mockStore); }
public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
@Test(expected = IllegalArgumentException.class) public void states_should_throw_when_storeIsNull() { states(null); fail("Should have thrown an exception"); }
public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
@Test public void actions_should_returnThis() { SingleActionCommand<String> action = new SingleActionCommandUnderTest(); final Action observedAction = action.actions().blockingFirst(); assertThat(action, is(observedAction)); }
@Override public final Observable<? extends Action<STATE>> actions() { return just(this); }
SingleActionCommand implements Action<STATE>, Command<STATE> { @Override public final Observable<? extends Action<STATE>> actions() { return just(this); } }
SingleActionCommand implements Action<STATE>, Command<STATE> { @Override public final Observable<? extends Action<STATE>> actions() { return just(this); } }
SingleActionCommand implements Action<STATE>, Command<STATE> { @Override public final Observable<? extends Action<STATE>> actions() { return just(this); } @Override final Observable<? extends Action<STATE>> actions(); }
SingleActionCommand implements Action<STATE>, Command<STATE> { @Override public final Observable<? extends Action<STATE>> actions() { return just(this); } @Override final Observable<? extends Action<STATE>> actions(); }
@Test public void actions_should_returnThis() { SingleActionCommand<String> action = new SingleActionCommandUnderTest(); final Action observedAction = action.actions().toBlocking().first(); assertThat(action, is(observedAction)); }
@Override public final Observable<? extends Action<STATE>> actions() { return just(this); }
SingleActionCommand implements Action<STATE>, Command<STATE> { @Override public final Observable<? extends Action<STATE>> actions() { return just(this); } }
SingleActionCommand implements Action<STATE>, Command<STATE> { @Override public final Observable<? extends Action<STATE>> actions() { return just(this); } }
SingleActionCommand implements Action<STATE>, Command<STATE> { @Override public final Observable<? extends Action<STATE>> actions() { return just(this); } @Override final Observable<? extends Action<STATE>> actions(); }
SingleActionCommand implements Action<STATE>, Command<STATE> { @Override public final Observable<? extends Action<STATE>> actions() { return just(this); } @Override final Observable<? extends Action<STATE>> actions(); }
@Test public void states_should_observeStateChanges() { Store<Integer> store = new Store<>(0); TestSubscriber<Integer> testSubscriber = new TestSubscriber<>(); states(store).subscribe(testSubscriber); store.dispatch(integer -> integer + 1); testSubscriber.assertNoTerminalEvent(); testSubscriber.assertValues(0, 1); }
public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
@Test public void states_should_stopObservingStateChanges() { Store<Integer> store = new Store<>(0); TestSubscriber<Integer> testSubscriber = new TestSubscriber<>(); final Subscription subscription = states(store).subscribe(testSubscriber); subscription.unsubscribe(); store.dispatch(integer -> integer + 1); final Integ...
public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
@Test public void states_should_unsubscribeListener() { Store<Integer> mockStore = createMock(Store.class); mockStore.subscribe(anyObject()); mockStore.unsubscribe(anyObject()); replay(mockStore); states(mockStore).subscribe().unsubscribe(); verify(mockStore); }
public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
@Test(expected = IllegalArgumentException.class) public void states_should_throw_when_storeIsNull() { states(null); fail("Should have thrown an exception"); }
public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store), BackpressureMode.ERROR); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
@Test public void testStoreWithInitialState_shouldReturnInitialState() { Store<Integer> store = new Store<>(0); Integer state = store.getState(); assertThat(state, is(0)); }
public STATE getState() { return state; }
Store { public STATE getState() { return state; } }
Store { public STATE getState() { return state; } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); }
Store { public STATE getState() { return state; } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); synchronized void dispatch(Action<STATE> action); STATE getState(); void subscribe(StateChangeListener<STATE> listener); @SuppressWarnings("WeakerAccess") void unsubscribe(StateChangeListener<STA...
Store { public STATE getState() { return state; } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); synchronized void dispatch(Action<STATE> action); STATE getState(); void subscribe(StateChangeListener<STATE> listener); @SuppressWarnings("WeakerAccess") void unsubscribe(StateChangeListener<STA...
@Test(expected = IllegalStateException.class) public void testDispatchAction_withMiddleWare_shouldFailWhenMiddlewareDoesNotCallProceed() { Middleware<Integer> mockMiddleWare = chain -> { }; Store<Integer> store = new Store<>(0, mockMiddleWare); final Action<Integer> incrementAction = integer -> integer + 1; store.dispa...
public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); }
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } }
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); }
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); synchronized void dispatch(Action<STATE> action); STATE getState(); void subscribe(StateChangeL...
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); synchronized void dispatch(Action<STATE> action); STATE getState(); void subscribe(StateChangeL...
@Test(expected = IllegalStateException.class) public void testDispatchAction_withMiddleWare_shouldFailIfMiddlewareCallsProceedTwice() { Middleware<Integer> mockMiddleWare = chain -> { chain.proceed(chain.action()); chain.proceed(chain.action()); }; Store<Integer> store = new Store<>(0, mockMiddleWare); final Action<Int...
public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); }
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } }
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); }
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); synchronized void dispatch(Action<STATE> action); STATE getState(); void subscribe(StateChangeL...
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); synchronized void dispatch(Action<STATE> action); STATE getState(); void subscribe(StateChangeL...
@Test public void testChainState_shouldReturnDifferentStateBeforeAndAfterChainProceed() { Middleware<Integer> mockMiddleWare = createStrictMock(Middleware.class); Store<Integer> store = new Store<>(0, mockMiddleWare); mockMiddleWare.intercept(anyObject(Middleware.Chain.class)); expectLastCall() .andAnswer( () -> { fina...
public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); }
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } }
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); }
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); synchronized void dispatch(Action<STATE> action); STATE getState(); void subscribe(StateChangeL...
Store { public synchronized void dispatch(Action<STATE> action) { actionQueue.add(action); if (isDispatching.get()) { return; } emitSequentially(); } @SafeVarargs Store(STATE initialState, Middleware<STATE>... middlewares); synchronized void dispatch(Action<STATE> action); STATE getState(); void subscribe(StateChangeL...
@Test public void states_should_observeInitialState() { Store<Integer> store = new Store<>(0); TestObserver<Integer> testSubscriber = new TestObserver<>(); states(store).subscribe(testSubscriber); testSubscriber.assertNotComplete(); testSubscriber.assertValue(0); }
public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
RxStores { public static <STATE> Observable<STATE> states(Store<STATE> store) { if (store == null) { throw new IllegalArgumentException("Store is null"); } return Observable.create(new StoreOnSubscribe<>(store)); } private RxStores(); static Observable<STATE> states(Store<STATE> store); }
@Test public void state() throws Exception { final MockResponse mockResponse = new MockResponse() .setResponseCode(200) .setBody(loadFile("fixtures/cameraStateResponse.json")); server.enqueue(mockResponse); final Response<State> response = client.state().execute(); assertThat(response.code(), equalTo(200)); final State...
public Call<State> state() { return service.state(); }
CameraClient { public Call<State> state() { return service.state(); } }
CameraClient { public Call<State> state() { return service.state(); } CameraClient(); CameraClient(String basePath); }
CameraClient { public Call<State> state() { return service.state(); } CameraClient(); CameraClient(String basePath); Call<State> state(); Call<Info> info(); Call<ListFiles.Response> listFiles(ListFiles listFilesCommand); Call<Status> commandStatus(Command.CommandId id); }
CameraClient { public Call<State> state() { return service.state(); } CameraClient(); CameraClient(String basePath); Call<State> state(); Call<Info> info(); Call<ListFiles.Response> listFiles(ListFiles listFilesCommand); Call<Status> commandStatus(Command.CommandId id); }
@Test public void info() throws Exception { final MockResponse mockResponse = new MockResponse() .setResponseCode(200) .setBody(loadFile("fixtures/cameraInfoResponse.json")); server.enqueue(mockResponse); final retrofit2.Response<Info> response = client.info().execute(); final Info info = response.body(); assertThat(in...
public Call<Info> info() { return service.info(); }
CameraClient { public Call<Info> info() { return service.info(); } }
CameraClient { public Call<Info> info() { return service.info(); } CameraClient(); CameraClient(String basePath); }
CameraClient { public Call<Info> info() { return service.info(); } CameraClient(); CameraClient(String basePath); Call<State> state(); Call<Info> info(); Call<ListFiles.Response> listFiles(ListFiles listFilesCommand); Call<Status> commandStatus(Command.CommandId id); }
CameraClient { public Call<Info> info() { return service.info(); } CameraClient(); CameraClient(String basePath); Call<State> state(); Call<Info> info(); Call<ListFiles.Response> listFiles(ListFiles listFilesCommand); Call<Status> commandStatus(Command.CommandId id); }
@Test public void commandStatus() throws Exception { server.enqueue( new MockResponse() .setResponseCode(200) .setBody(loadFile("fixtures/cameraStatusResponse.json")) ); final Response<Status> statusResponse = client.commandStatus( new Command.CommandId("fancyCommandId") ).execute(); final RecordedRequest recordedReque...
public Call<Status> commandStatus(Command.CommandId id) { return service.commandStatus(id); }
CameraClient { public Call<Status> commandStatus(Command.CommandId id) { return service.commandStatus(id); } }
CameraClient { public Call<Status> commandStatus(Command.CommandId id) { return service.commandStatus(id); } CameraClient(); CameraClient(String basePath); }
CameraClient { public Call<Status> commandStatus(Command.CommandId id) { return service.commandStatus(id); } CameraClient(); CameraClient(String basePath); Call<State> state(); Call<Info> info(); Call<ListFiles.Response> listFiles(ListFiles listFilesCommand); Call<Status> commandStatus(Command.CommandId id); }
CameraClient { public Call<Status> commandStatus(Command.CommandId id) { return service.commandStatus(id); } CameraClient(); CameraClient(String basePath); Call<State> state(); Call<Info> info(); Call<ListFiles.Response> listFiles(ListFiles listFilesCommand); Call<Status> commandStatus(Command.CommandId id); }
@Test public void givenALocationFragment_whenOnAttachIsCalled_thenItStartsObservingTheLiveDataObject() throws Exception { locationFragment.onAttach(context); verify(locationLiveData).observe(eq(locationFragment), any(Observer.class)); }
@Override public void onAttach(Context context) { super.onAttach(context); FragmentActivity activity = getActivity(); LocationViewModel locationViewModel = getViewModelProvider(activity).get(LocationViewModel.class); LiveData<CommonLocation> liveData = locationViewModel.getLocation(context); liveData.observe(this, new ...
LocationFragment extends LifecycleFragment implements LocationListener { @Override public void onAttach(Context context) { super.onAttach(context); FragmentActivity activity = getActivity(); LocationViewModel locationViewModel = getViewModelProvider(activity).get(LocationViewModel.class); LiveData<CommonLocation> liveD...
LocationFragment extends LifecycleFragment implements LocationListener { @Override public void onAttach(Context context) { super.onAttach(context); FragmentActivity activity = getActivity(); LocationViewModel locationViewModel = getViewModelProvider(activity).get(LocationViewModel.class); LiveData<CommonLocation> liveD...
LocationFragment extends LifecycleFragment implements LocationListener { @Override public void onAttach(Context context) { super.onAttach(context); FragmentActivity activity = getActivity(); LocationViewModel locationViewModel = getViewModelProvider(activity).get(LocationViewModel.class); LiveData<CommonLocation> liveD...
LocationFragment extends LifecycleFragment implements LocationListener { @Override public void onAttach(Context context) { super.onAttach(context); FragmentActivity activity = getActivity(); LocationViewModel locationViewModel = getViewModelProvider(activity).get(LocationViewModel.class); LiveData<CommonLocation> liveD...
@Test public void testGetStaticLabel() { System.out.println("getStaticLabel"); LoadosophiaUploaderGui instance = new LoadosophiaUploaderGui(); String result = instance.getStaticLabel(); Assert.assertTrue(result.length() > 0); }
@Override public String getStaticLabel() { return "bzm - BlazeMeter Sense Uploader"; }
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public String getStaticLabel() { return "bzm - BlazeMeter Sense Uploader"; } }
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public String getStaticLabel() { return "bzm - BlazeMeter Sense Uploader"; } LoadosophiaUploaderGui(); }
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public String getStaticLabel() { return "bzm - BlazeMeter Sense Uploader"; } LoadosophiaUploaderGui(); @Override String getStaticLabel(); @Override String getLabelResource(); @Override TestElement c...
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public String getStaticLabel() { return "bzm - BlazeMeter Sense Uploader"; } LoadosophiaUploaderGui(); @Override String getStaticLabel(); @Override String getLabelResource(); @Override TestElement c...
@Test public void testGetDataToSend() { System.out.println("addSample"); LoadosophiaClient instance = new LoadosophiaClient(); List<SampleResult> list = new LinkedList<>(); list.add(new SampleResult(System.currentTimeMillis(), 1)); list.add(new SampleResult(System.currentTimeMillis() + 1000, 1)); list.add(new SampleRes...
public JSONArray getDataToSend(List<SampleResult> list) { JSONArray data = new JSONArray(); SortedMap<Long, List<SampleResult>> sortedResults = sortResults(list); for (Long sec : sortedResults.keySet()) { data.add(getAggregateSecond(sec, sortedResults.get(sec))); } return data; }
LoadosophiaClient implements BackendListenerClient { public JSONArray getDataToSend(List<SampleResult> list) { JSONArray data = new JSONArray(); SortedMap<Long, List<SampleResult>> sortedResults = sortResults(list); for (Long sec : sortedResults.keySet()) { data.add(getAggregateSecond(sec, sortedResults.get(sec))); } r...
LoadosophiaClient implements BackendListenerClient { public JSONArray getDataToSend(List<SampleResult> list) { JSONArray data = new JSONArray(); SortedMap<Long, List<SampleResult>> sortedResults = sortResults(list); for (Long sec : sortedResults.keySet()) { data.add(getAggregateSecond(sec, sortedResults.get(sec))); } r...
LoadosophiaClient implements BackendListenerClient { public JSONArray getDataToSend(List<SampleResult> list) { JSONArray data = new JSONArray(); SortedMap<Long, List<SampleResult>> sortedResults = sortResults(list); for (Long sec : sortedResults.keySet()) { data.add(getAggregateSecond(sec, sortedResults.get(sec))); } r...
LoadosophiaClient implements BackendListenerClient { public JSONArray getDataToSend(List<SampleResult> list) { JSONArray data = new JSONArray(); SortedMap<Long, List<SampleResult>> sortedResults = sortResults(list); for (Long sec : sortedResults.keySet()) { data.add(getAggregateSecond(sec, sortedResults.get(sec))); } r...
@Test public void testGetQuantiles() { System.out.println("getQuantiles"); Long[] rtimes = {1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L}; JSONObject result = LoadosophiaClient.getQuantilesJSON(rtimes); assertEquals("{\"100.0\":10,\"99.0\":10,\"98.0\":10,\"95.0\":10,\"90.0\":9,\"80.0\":8,\"75.0\":8,\"50.0\":5,\"25.0\":3}", ...
public static JSONObject getQuantilesJSON(Long[] rtimes) { JSONObject result = new JSONObject(); Arrays.sort(rtimes); double[] quantiles = {0.25, 0.50, 0.75, 0.80, 0.90, 0.95, 0.98, 0.99, 1.00}; Stack<Long> timings = new Stack<>(); timings.addAll(Arrays.asList(rtimes)); double level = 1.0; Object timing = 0; for (int q...
LoadosophiaClient implements BackendListenerClient { public static JSONObject getQuantilesJSON(Long[] rtimes) { JSONObject result = new JSONObject(); Arrays.sort(rtimes); double[] quantiles = {0.25, 0.50, 0.75, 0.80, 0.90, 0.95, 0.98, 0.99, 1.00}; Stack<Long> timings = new Stack<>(); timings.addAll(Arrays.asList(rtimes...
LoadosophiaClient implements BackendListenerClient { public static JSONObject getQuantilesJSON(Long[] rtimes) { JSONObject result = new JSONObject(); Arrays.sort(rtimes); double[] quantiles = {0.25, 0.50, 0.75, 0.80, 0.90, 0.95, 0.98, 0.99, 1.00}; Stack<Long> timings = new Stack<>(); timings.addAll(Arrays.asList(rtimes...
LoadosophiaClient implements BackendListenerClient { public static JSONObject getQuantilesJSON(Long[] rtimes) { JSONObject result = new JSONObject(); Arrays.sort(rtimes); double[] quantiles = {0.25, 0.50, 0.75, 0.80, 0.90, 0.95, 0.98, 0.99, 1.00}; Stack<Long> timings = new Stack<>(); timings.addAll(Arrays.asList(rtimes...
LoadosophiaClient implements BackendListenerClient { public static JSONObject getQuantilesJSON(Long[] rtimes) { JSONObject result = new JSONObject(); Arrays.sort(rtimes); double[] quantiles = {0.25, 0.50, 0.75, 0.80, 0.90, 0.95, 0.98, 0.99, 1.00}; Stack<Long> timings = new Stack<>(); timings.addAll(Arrays.asList(rtimes...
@Test public void testGetQuantilesJSON() { System.out.println("getQuantilesJSON"); Long[] rtimes = new Long[0]; JSONObject result = LoadosophiaClient.getQuantilesJSON(rtimes); assertNotNull(result); }
public static JSONObject getQuantilesJSON(Long[] rtimes) { JSONObject result = new JSONObject(); Arrays.sort(rtimes); double[] quantiles = {0.25, 0.50, 0.75, 0.80, 0.90, 0.95, 0.98, 0.99, 1.00}; Stack<Long> timings = new Stack<>(); timings.addAll(Arrays.asList(rtimes)); double level = 1.0; Object timing = 0; for (int q...
LoadosophiaClient implements BackendListenerClient { public static JSONObject getQuantilesJSON(Long[] rtimes) { JSONObject result = new JSONObject(); Arrays.sort(rtimes); double[] quantiles = {0.25, 0.50, 0.75, 0.80, 0.90, 0.95, 0.98, 0.99, 1.00}; Stack<Long> timings = new Stack<>(); timings.addAll(Arrays.asList(rtimes...
LoadosophiaClient implements BackendListenerClient { public static JSONObject getQuantilesJSON(Long[] rtimes) { JSONObject result = new JSONObject(); Arrays.sort(rtimes); double[] quantiles = {0.25, 0.50, 0.75, 0.80, 0.90, 0.95, 0.98, 0.99, 1.00}; Stack<Long> timings = new Stack<>(); timings.addAll(Arrays.asList(rtimes...
LoadosophiaClient implements BackendListenerClient { public static JSONObject getQuantilesJSON(Long[] rtimes) { JSONObject result = new JSONObject(); Arrays.sort(rtimes); double[] quantiles = {0.25, 0.50, 0.75, 0.80, 0.90, 0.95, 0.98, 0.99, 1.00}; Stack<Long> timings = new Stack<>(); timings.addAll(Arrays.asList(rtimes...
LoadosophiaClient implements BackendListenerClient { public static JSONObject getQuantilesJSON(Long[] rtimes) { JSONObject result = new JSONObject(); Arrays.sort(rtimes); double[] quantiles = {0.25, 0.50, 0.75, 0.80, 0.90, 0.95, 0.98, 0.99, 1.00}; Stack<Long> timings = new Stack<>(); timings.addAll(Arrays.asList(rtimes...
@Test public void testStop() throws Exception { LoadosophiaClient client = new LoadosophiaClient(); client.setOnlineInitiated(true); client.setResultCollector(new ResultCollector()); client.setFileName(""); StatusNotifierCallbackTest.StatusNotifierCallbackImpl notifierCallback = new StatusNotifierCallbackTest.StatusNot...
protected void stop() { String redirectLink = ""; try { flush(); if (fileName == null) { throw new IOException("File for upload was not set, search for errors above in log"); } LinkedList<String> monFiles; if (hasStandardSet()) { monFiles = PerfMonCollector.getFiles(); } else { monFiles = new LinkedList<>(); } Loadosop...
LoadosophiaClient implements BackendListenerClient { protected void stop() { String redirectLink = ""; try { flush(); if (fileName == null) { throw new IOException("File for upload was not set, search for errors above in log"); } LinkedList<String> monFiles; if (hasStandardSet()) { monFiles = PerfMonCollector.getFiles(...
LoadosophiaClient implements BackendListenerClient { protected void stop() { String redirectLink = ""; try { flush(); if (fileName == null) { throw new IOException("File for upload was not set, search for errors above in log"); } LinkedList<String> monFiles; if (hasStandardSet()) { monFiles = PerfMonCollector.getFiles(...
LoadosophiaClient implements BackendListenerClient { protected void stop() { String redirectLink = ""; try { flush(); if (fileName == null) { throw new IOException("File for upload was not set, search for errors above in log"); } LinkedList<String> monFiles; if (hasStandardSet()) { monFiles = PerfMonCollector.getFiles(...
LoadosophiaClient implements BackendListenerClient { protected void stop() { String redirectLink = ""; try { flush(); if (fileName == null) { throw new IOException("File for upload was not set, search for errors above in log"); } LinkedList<String> monFiles; if (hasStandardSet()) { monFiles = PerfMonCollector.getFiles(...
@Test public void testSetFilePrefix() { System.out.println("setFilePrefix"); String prefix = ""; LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); instance.setTitle(prefix); }
public void setTitle(String prefix) { setProperty(TITLE, prefix); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setTitle(String prefix) { setProperty(TITLE, prefix); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setTitle(String prefix) { setProperty(TITLE, prefix); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setTitle(String prefix) { setProperty(TITLE, prefix); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); ...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setTitle(String prefix) { setProperty(TITLE, prefix); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); ...
@Test public void testSetProject() { System.out.println("setProject"); String proj = ""; LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); instance.setProject(proj); }
public void setProject(String proj) { setProperty(PROJECT, proj); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setProject(String proj) { setProperty(PROJECT, proj); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setProject(String proj) { setProperty(PROJECT, proj); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setProject(String proj) { setProperty(PROJECT, proj); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); ...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setProject(String proj) { setProperty(PROJECT, proj); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); ...
@Test public void testSetUploadToken() { System.out.println("setUploadToken"); String token = ""; LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); instance.setUploadToken(token); }
public void setUploadToken(String token) { setProperty(UPLOAD_TOKEN, token); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setUploadToken(String token) { setProperty(UPLOAD_TOKEN, token); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setUploadToken(String token) { setProperty(UPLOAD_TOKEN, token); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setUploadToken(String token) { setProperty(UPLOAD_TOKEN, token); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(Str...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setUploadToken(String token) { setProperty(UPLOAD_TOKEN, token); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(Str...
@Test public void testGetProject() { System.out.println("getProject"); LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); String expResult = ""; String result = instance.getProject(); Assert.assertEquals(expResult, result); }
public String getProject() { return getPropertyAsString(PROJECT); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getProject() { return getPropertyAsString(PROJECT); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getProject() { return getPropertyAsString(PROJECT); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getProject() { return getPropertyAsString(PROJECT); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); ...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getProject() { return getPropertyAsString(PROJECT); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); ...
@Test public void testGetUploadToken() { System.out.println("getUploadToken"); LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); String expResult = ""; String result = instance.getUploadToken(); Assert.assertEquals(expResult, result); }
public String getUploadToken() { return getPropertyAsString(UPLOAD_TOKEN).trim(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getUploadToken() { return getPropertyAsString(UPLOAD_TOKEN).trim(); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getUploadToken() { return getPropertyAsString(UPLOAD_TOKEN).trim(); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getUploadToken() { return getPropertyAsString(UPLOAD_TOKEN).trim(); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnde...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getUploadToken() { return getPropertyAsString(UPLOAD_TOKEN).trim(); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnde...
@Test public void testGetFilePrefix() { System.out.println("getFilePrefix"); LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); String expResult = ""; String result = instance.getTitle(); Assert.assertEquals(expResult, result); }
public String getTitle() { return getPropertyAsString(TITLE); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getTitle() { return getPropertyAsString(TITLE); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getTitle() { return getPropertyAsString(TITLE); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getTitle() { return getPropertyAsString(TITLE); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); @Ove...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getTitle() { return getPropertyAsString(TITLE); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); @Ove...
@Test public void testGetLabelResource() { System.out.println("getLabelResource"); LoadosophiaUploaderGui instance = new LoadosophiaUploaderGui(); String result = instance.getLabelResource(); Assert.assertTrue(result.length() > 0); }
@Override public String getLabelResource() { return getClass().getCanonicalName(); }
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public String getLabelResource() { return getClass().getCanonicalName(); } }
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public String getLabelResource() { return getClass().getCanonicalName(); } LoadosophiaUploaderGui(); }
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public String getLabelResource() { return getClass().getCanonicalName(); } LoadosophiaUploaderGui(); @Override String getStaticLabel(); @Override String getLabelResource(); @Override TestElement cre...
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public String getLabelResource() { return getClass().getCanonicalName(); } LoadosophiaUploaderGui(); @Override String getStaticLabel(); @Override String getLabelResource(); @Override TestElement cre...
@Test public void testGetStoreDir() { System.out.println("getStoreDir"); LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); String expResult = ""; String result = instance.getStoreDir(); Assert.assertEquals(expResult, result); }
public String getStoreDir() { return getPropertyAsString(STORE_DIR); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getStoreDir() { return getPropertyAsString(STORE_DIR); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getStoreDir() { return getPropertyAsString(STORE_DIR); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getStoreDir() { return getPropertyAsString(STORE_DIR); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getStoreDir() { return getPropertyAsString(STORE_DIR); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host...
@Test public void testSetStoreDir() { System.out.println("setStoreDir"); String prefix = ""; LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); instance.setStoreDir(prefix); }
public void setStoreDir(String prefix) { setProperty(STORE_DIR, prefix); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setStoreDir(String prefix) { setProperty(STORE_DIR, prefix); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setStoreDir(String prefix) { setProperty(STORE_DIR, prefix); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setStoreDir(String prefix) { setProperty(STORE_DIR, prefix); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String ...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setStoreDir(String prefix) { setProperty(STORE_DIR, prefix); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String ...
@Test public void testSetTitle() { System.out.println("setTitle"); String prefix = ""; LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); instance.setTitle(prefix); }
public void setTitle(String prefix) { setProperty(TITLE, prefix); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setTitle(String prefix) { setProperty(TITLE, prefix); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setTitle(String prefix) { setProperty(TITLE, prefix); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setTitle(String prefix) { setProperty(TITLE, prefix); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); ...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setTitle(String prefix) { setProperty(TITLE, prefix); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); ...
@Test public void testGetTitle() { System.out.println("getTitle"); LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); String expResult = ""; String result = instance.getTitle(); Assert.assertEquals(expResult, result); }
public String getTitle() { return getPropertyAsString(TITLE); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getTitle() { return getPropertyAsString(TITLE); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getTitle() { return getPropertyAsString(TITLE); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getTitle() { return getPropertyAsString(TITLE); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); @Ove...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getTitle() { return getPropertyAsString(TITLE); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); @Ove...
@Test public void testSetColorFlag() { System.out.println("setColorFlag"); String color = ""; LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); instance.setColorFlag(color); }
public void setColorFlag(String color) { setProperty(COLOR, color); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setColorFlag(String color) { setProperty(COLOR, color); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setColorFlag(String color) { setProperty(COLOR, color); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setColorFlag(String color) { setProperty(COLOR, color); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host)...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setColorFlag(String color) { setProperty(COLOR, color); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host)...
@Test public void testGetColorFlag() { System.out.println("getColorFlag"); LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); String expResult = ""; String result = instance.getColorFlag(); Assert.assertEquals(expResult, result); }
public String getColorFlag() { return getPropertyAsString(COLOR); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getColorFlag() { return getPropertyAsString(COLOR); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getColorFlag() { return getPropertyAsString(COLOR); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getColorFlag() { return getPropertyAsString(COLOR); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); ...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public String getColorFlag() { return getPropertyAsString(COLOR); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host); ...
@Test public void testNotifyAbout() { System.out.println("notifyAbout"); String info = ""; LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); instance.notifyAbout(info); }
@Override public void notifyAbout(String info) { informUser(info); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public void notifyAbout(String info) { informUser(info); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public void notifyAbout(String info) { informUser(info); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public void notifyAbout(String info) { informUser(info); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host);...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public void notifyAbout(String info) { informUser(info); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String host);...
@Test public void testIsUseOnline() { System.out.println("isUseOnline"); LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); boolean result = instance.isUseOnline(); Assert.assertEquals(false, result); }
public boolean isUseOnline() { return getPropertyAsBoolean(USE_ONLINE); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public boolean isUseOnline() { return getPropertyAsBoolean(USE_ONLINE); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public boolean isUseOnline() { return getPropertyAsBoolean(USE_ONLINE); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public boolean isUseOnline() { return getPropertyAsBoolean(USE_ONLINE); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String h...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public boolean isUseOnline() { return getPropertyAsBoolean(USE_ONLINE); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(String h...
@Test public void testSetUseOnline() { System.out.println("setUseOnline"); LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); instance.setUseOnline(false); }
public void setUseOnline(boolean selected) { setProperty(USE_ONLINE, selected); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setUseOnline(boolean selected) { setProperty(USE_ONLINE, selected); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setUseOnline(boolean selected) { setProperty(USE_ONLINE, selected); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setUseOnline(boolean selected) { setProperty(USE_ONLINE, selected); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { public void setUseOnline(boolean selected) { setProperty(USE_ONLINE, selected); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testStarted(String host); @Override void testEnded(...
@Test public void testSampleOccurred() { System.out.println("sampleOccurred"); SampleResult res = new SampleResult(); SampleEvent event = new SampleEvent(res, "test"); LoadosophiaUploader instance = new LoadosophiaUploaderEmul(); instance.testStarted(); instance.sampleOccurred(event); }
@Override public void sampleOccurred(SampleEvent event) { super.sampleOccurred(event); resultCollector.sampleOccurred(event); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public void sampleOccurred(SampleEvent event) { super.sampleOccurred(event); resultCollector.sampleOccurred(event); } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public void sampleOccurred(SampleEvent event) { super.sampleOccurred(event); resultCollector.sampleOccurred(event); } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public void sampleOccurred(SampleEvent event) { super.sampleOccurred(event); resultCollector.sampleOccurred(event); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testS...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public void sampleOccurred(SampleEvent event) { super.sampleOccurred(event); resultCollector.sampleOccurred(event); } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override void testS...
@Test public void testCreateTestElement() { System.out.println("createTestElement"); LoadosophiaUploaderGui instance = new LoadosophiaUploaderGui(); TestElement result = instance.createTestElement(); Assert.assertTrue(result instanceof LoadosophiaUploader); }
@Override public TestElement createTestElement() { TestElement te = new LoadosophiaUploader(); modifyTestElement(te); te.setComment(JMeterPluginsUtils.getWikiLinkText(WIKIPAGE)); return te; }
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public TestElement createTestElement() { TestElement te = new LoadosophiaUploader(); modifyTestElement(te); te.setComment(JMeterPluginsUtils.getWikiLinkText(WIKIPAGE)); return te; } }
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public TestElement createTestElement() { TestElement te = new LoadosophiaUploader(); modifyTestElement(te); te.setComment(JMeterPluginsUtils.getWikiLinkText(WIKIPAGE)); return te; } LoadosophiaUploa...
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public TestElement createTestElement() { TestElement te = new LoadosophiaUploader(); modifyTestElement(te); te.setComment(JMeterPluginsUtils.getWikiLinkText(WIKIPAGE)); return te; } LoadosophiaUploa...
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public TestElement createTestElement() { TestElement te = new LoadosophiaUploader(); modifyTestElement(te); te.setComment(JMeterPluginsUtils.getWikiLinkText(WIKIPAGE)); return te; } LoadosophiaUploa...
@Test public void testClone() throws Exception { LoadosophiaUploader uploader = new LoadosophiaUploader(); LoadosophiaUploaderGui gui = new LoadosophiaUploaderGui(); uploader.setGui(gui); LoadosophiaUploader clone = (LoadosophiaUploader) uploader.clone(); Assert.assertEquals(gui, clone.gui); }
@Override public Object clone() { LoadosophiaUploader clone = (LoadosophiaUploader) super.clone(); clone.gui = this.gui; return clone; }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public Object clone() { LoadosophiaUploader clone = (LoadosophiaUploader) super.clone(); clone.gui = this.gui; return clone; } }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public Object clone() { LoadosophiaUploader clone = (LoadosophiaUploader) super.clone(); clone.gui = this.gui; return clone; } LoadosophiaUploader(); }
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public Object clone() { LoadosophiaUploader clone = (LoadosophiaUploader) super.clone(); clone.gui = this.gui; return clone; } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override v...
LoadosophiaUploader extends BackendListener implements StatusNotifierCallback, Clearable { @Override public Object clone() { LoadosophiaUploader clone = (LoadosophiaUploader) super.clone(); clone.gui = this.gui; return clone; } LoadosophiaUploader(); @Override void testStarted(); @Override void testEnded(); @Override v...
@Test public void testSendFiles() throws Exception { System.out.println("sendFiles"); File targetFile = File.createTempFile(".jtl", "temp"); PrintStream ps = new PrintStream(targetFile); ps.print("test"); ps.close(); LinkedList<String> perfMonFiles = new LinkedList<>(); LoadosophiaAPIClientEmul instance = new Loadosoph...
public LoadosophiaUploadResults sendFiles(File targetFile, LinkedList<String> perfMonFiles) throws IOException { notifier.notifyAbout("Starting upload to BM.Sense"); LoadosophiaUploadResults results = new LoadosophiaUploadResults(); LinkedList<FormBodyPart> partsList = getUploadParts(targetFile, perfMonFiles); JSONObje...
LoadosophiaAPIClient extends HttpUtils { public LoadosophiaUploadResults sendFiles(File targetFile, LinkedList<String> perfMonFiles) throws IOException { notifier.notifyAbout("Starting upload to BM.Sense"); LoadosophiaUploadResults results = new LoadosophiaUploadResults(); LinkedList<FormBodyPart> partsList = getUpload...
LoadosophiaAPIClient extends HttpUtils { public LoadosophiaUploadResults sendFiles(File targetFile, LinkedList<String> perfMonFiles) throws IOException { notifier.notifyAbout("Starting upload to BM.Sense"); LoadosophiaUploadResults results = new LoadosophiaUploadResults(); LinkedList<FormBodyPart> partsList = getUpload...
LoadosophiaAPIClient extends HttpUtils { public LoadosophiaUploadResults sendFiles(File targetFile, LinkedList<String> perfMonFiles) throws IOException { notifier.notifyAbout("Starting upload to BM.Sense"); LoadosophiaUploadResults results = new LoadosophiaUploadResults(); LinkedList<FormBodyPart> partsList = getUpload...
LoadosophiaAPIClient extends HttpUtils { public LoadosophiaUploadResults sendFiles(File targetFile, LinkedList<String> perfMonFiles) throws IOException { notifier.notifyAbout("Starting upload to BM.Sense"); LoadosophiaUploadResults results = new LoadosophiaUploadResults(); LinkedList<FormBodyPart> partsList = getUpload...
@Test public void testStartOnline() throws Exception { System.out.println("startOnline"); LoadosophiaAPIClientEmul instance = new LoadosophiaAPIClientEmul(this); JSONObject resp = new JSONObject(); resp.put("OnlineID", "123123"); instance.addEmul(resp); String expResult = "http: String result = instance.startOnline(); ...
public String startOnline() throws IOException { String uri = address + "api/active/receiver/start"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); partsList.add(new FormBodyPart("token", new StringBody(token))); partsList.add(new FormBodyPart("projectKey", new StringBody(project))); partsList.add(new FormBod...
LoadosophiaAPIClient extends HttpUtils { public String startOnline() throws IOException { String uri = address + "api/active/receiver/start"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); partsList.add(new FormBodyPart("token", new StringBody(token))); partsList.add(new FormBodyPart("projectKey", new StringB...
LoadosophiaAPIClient extends HttpUtils { public String startOnline() throws IOException { String uri = address + "api/active/receiver/start"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); partsList.add(new FormBodyPart("token", new StringBody(token))); partsList.add(new FormBodyPart("projectKey", new StringB...
LoadosophiaAPIClient extends HttpUtils { public String startOnline() throws IOException { String uri = address + "api/active/receiver/start"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); partsList.add(new FormBodyPart("token", new StringBody(token))); partsList.add(new FormBodyPart("projectKey", new StringB...
LoadosophiaAPIClient extends HttpUtils { public String startOnline() throws IOException { String uri = address + "api/active/receiver/start"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); partsList.add(new FormBodyPart("token", new StringBody(token))); partsList.add(new FormBodyPart("projectKey", new StringB...
@Test public void testEndOnline() throws Exception { System.out.println("endOnline"); LoadosophiaAPIClientEmul instance = new LoadosophiaAPIClientEmul(this); instance.addEmul(new JSONObject()); instance.endOnline(""); }
public void endOnline(String redirectLink) throws IOException { String uri = address + "api/active/receiver/stop"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); partsList.add(new FormBodyPart("redirect", new StringBody(redirectLink))); query(createPost(uri, partsList), 205); }
LoadosophiaAPIClient extends HttpUtils { public void endOnline(String redirectLink) throws IOException { String uri = address + "api/active/receiver/stop"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); partsList.add(new FormBodyPart("redirect", new StringBody(redirectLink))); query(createPost(uri, partsList)...
LoadosophiaAPIClient extends HttpUtils { public void endOnline(String redirectLink) throws IOException { String uri = address + "api/active/receiver/stop"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); partsList.add(new FormBodyPart("redirect", new StringBody(redirectLink))); query(createPost(uri, partsList)...
LoadosophiaAPIClient extends HttpUtils { public void endOnline(String redirectLink) throws IOException { String uri = address + "api/active/receiver/stop"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); partsList.add(new FormBodyPart("redirect", new StringBody(redirectLink))); query(createPost(uri, partsList)...
LoadosophiaAPIClient extends HttpUtils { public void endOnline(String redirectLink) throws IOException { String uri = address + "api/active/receiver/stop"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); partsList.add(new FormBodyPart("redirect", new StringBody(redirectLink))); query(createPost(uri, partsList)...
@Test public void testSendOnlineData() throws Exception { System.out.println("sendOnlineData"); JSONArray data = new JSONArray(); LoadosophiaAPIClientEmul instance = new LoadosophiaAPIClientEmul(this); instance.addEmul(new JSONObject()); instance.sendOnlineData(data); }
public void sendOnlineData(JSONArray data) throws IOException { String uri = address + "api/active/receiver/data"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); String dataStr = data.toString(); log.debug("Sending active test data: " + dataStr); partsList.add(new FormBodyPart("data", new StringBody(dataStr))...
LoadosophiaAPIClient extends HttpUtils { public void sendOnlineData(JSONArray data) throws IOException { String uri = address + "api/active/receiver/data"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); String dataStr = data.toString(); log.debug("Sending active test data: " + dataStr); partsList.add(new Form...
LoadosophiaAPIClient extends HttpUtils { public void sendOnlineData(JSONArray data) throws IOException { String uri = address + "api/active/receiver/data"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); String dataStr = data.toString(); log.debug("Sending active test data: " + dataStr); partsList.add(new Form...
LoadosophiaAPIClient extends HttpUtils { public void sendOnlineData(JSONArray data) throws IOException { String uri = address + "api/active/receiver/data"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); String dataStr = data.toString(); log.debug("Sending active test data: " + dataStr); partsList.add(new Form...
LoadosophiaAPIClient extends HttpUtils { public void sendOnlineData(JSONArray data) throws IOException { String uri = address + "api/active/receiver/data"; LinkedList<FormBodyPart> partsList = new LinkedList<>(); String dataStr = data.toString(); log.debug("Sending active test data: " + dataStr); partsList.add(new Form...
@Test public void testGetRedirectLink() { System.out.println("getRedirectLink"); LoadosophiaUploadResults instance = new LoadosophiaUploadResults(); String expResult = ""; String result = instance.getRedirectLink(); Assert.assertEquals(expResult, result); }
public String getRedirectLink() { return redirect; }
LoadosophiaUploadResults { public String getRedirectLink() { return redirect; } }
LoadosophiaUploadResults { public String getRedirectLink() { return redirect; } }
LoadosophiaUploadResults { public String getRedirectLink() { return redirect; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
LoadosophiaUploadResults { public String getRedirectLink() { return redirect; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
@Test public void testSetRedirectLink() { System.out.println("setRedirectLink"); String string = ""; LoadosophiaUploadResults instance = new LoadosophiaUploadResults(); instance.setRedirectLink(string); }
public void setRedirectLink(String string) { redirect = string; }
LoadosophiaUploadResults { public void setRedirectLink(String string) { redirect = string; } }
LoadosophiaUploadResults { public void setRedirectLink(String string) { redirect = string; } }
LoadosophiaUploadResults { public void setRedirectLink(String string) { redirect = string; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
LoadosophiaUploadResults { public void setRedirectLink(String string) { redirect = string; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
@Test public void testSetQueueID() { System.out.println("setQueueID"); int aQueueID = 0; LoadosophiaUploadResults instance = new LoadosophiaUploadResults(); instance.setQueueID(aQueueID); }
public void setQueueID(int aQueueID) { queueID = aQueueID; }
LoadosophiaUploadResults { public void setQueueID(int aQueueID) { queueID = aQueueID; } }
LoadosophiaUploadResults { public void setQueueID(int aQueueID) { queueID = aQueueID; } }
LoadosophiaUploadResults { public void setQueueID(int aQueueID) { queueID = aQueueID; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
LoadosophiaUploadResults { public void setQueueID(int aQueueID) { queueID = aQueueID; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
@Test public void testSetTestID() { System.out.println("setTestID"); int aTestID = 0; LoadosophiaUploadResults instance = new LoadosophiaUploadResults(); instance.setTestID(aTestID); }
public void setTestID(int aTestID) { testID = aTestID; }
LoadosophiaUploadResults { public void setTestID(int aTestID) { testID = aTestID; } }
LoadosophiaUploadResults { public void setTestID(int aTestID) { testID = aTestID; } }
LoadosophiaUploadResults { public void setTestID(int aTestID) { testID = aTestID; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
LoadosophiaUploadResults { public void setTestID(int aTestID) { testID = aTestID; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
@Test public void testGetTestID() { System.out.println("getTestID"); LoadosophiaUploadResults instance = new LoadosophiaUploadResults(); int expResult = 0; int result = instance.getTestID(); Assert.assertEquals(expResult, result); }
public int getTestID() { return testID; }
LoadosophiaUploadResults { public int getTestID() { return testID; } }
LoadosophiaUploadResults { public int getTestID() { return testID; } }
LoadosophiaUploadResults { public int getTestID() { return testID; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
LoadosophiaUploadResults { public int getTestID() { return testID; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
@Test public void testModifyTestElement() { System.out.println("modifyTestElement"); TestElement te = new LoadosophiaUploader(); LoadosophiaUploaderGui instance = new LoadosophiaUploaderGui(); instance.modifyTestElement(te); }
@Override public void modifyTestElement(TestElement te) { super.configureTestElement(te); if (te instanceof LoadosophiaUploader) { LoadosophiaUploader fw = (LoadosophiaUploader) te; fw.setProject(projectKey.getText()); fw.setUploadToken(uploadToken.getText()); fw.setStoreDir(storeDir.getText()); fw.setColorFlag(indexTo...
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public void modifyTestElement(TestElement te) { super.configureTestElement(te); if (te instanceof LoadosophiaUploader) { LoadosophiaUploader fw = (LoadosophiaUploader) te; fw.setProject(projectKey.g...
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public void modifyTestElement(TestElement te) { super.configureTestElement(te); if (te instanceof LoadosophiaUploader) { LoadosophiaUploader fw = (LoadosophiaUploader) te; fw.setProject(projectKey.g...
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public void modifyTestElement(TestElement te) { super.configureTestElement(te); if (te instanceof LoadosophiaUploader) { LoadosophiaUploader fw = (LoadosophiaUploader) te; fw.setProject(projectKey.g...
LoadosophiaUploaderGui extends AbstractListenerGui implements HyperlinkListener, Clearable, UnsharedComponent { @Override public void modifyTestElement(TestElement te) { super.configureTestElement(te); if (te instanceof LoadosophiaUploader) { LoadosophiaUploader fw = (LoadosophiaUploader) te; fw.setProject(projectKey.g...
@Test public void testGetQueueID() { System.out.println("getQueueID"); LoadosophiaUploadResults instance = new LoadosophiaUploadResults(); int expResult = 0; int result = instance.getQueueID(); Assert.assertEquals(expResult, result); }
public int getQueueID() { return queueID; }
LoadosophiaUploadResults { public int getQueueID() { return queueID; } }
LoadosophiaUploadResults { public int getQueueID() { return queueID; } }
LoadosophiaUploadResults { public int getQueueID() { return queueID; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
LoadosophiaUploadResults { public int getQueueID() { return queueID; } String getRedirectLink(); void setRedirectLink(String string); void setQueueID(int aQueueID); void setTestID(int aTestID); int getTestID(); int getQueueID(); }
@Test public void testFlow() throws Exception { final StatusNotifierCallbackTest.StatusNotifierCallbackImpl callbackTest = new StatusNotifierCallbackTest.StatusNotifierCallbackImpl(); final String address = "empty_host"; BlazeMeterReport report = new BlazeMeterReport(); report.setToken("test_token"); BlazeMeterHttpUtil...
public BlazeMeterReport getReport() { return report; }
BlazeMeterHttpUtils extends HttpUtils { public BlazeMeterReport getReport() { return report; } }
BlazeMeterHttpUtils extends HttpUtils { public BlazeMeterReport getReport() { return report; } BlazeMeterHttpUtils(StatusNotifierCallback notifier, String address, String dataAddress, BlazeMeterReport report); }
BlazeMeterHttpUtils extends HttpUtils { public BlazeMeterReport getReport() { return report; } BlazeMeterHttpUtils(StatusNotifierCallback notifier, String address, String dataAddress, BlazeMeterReport report); BlazeMeterReport getReport(); }
BlazeMeterHttpUtils extends HttpUtils { public BlazeMeterReport getReport() { return report; } BlazeMeterHttpUtils(StatusNotifierCallback notifier, String address, String dataAddress, BlazeMeterReport report); BlazeMeterReport getReport(); }
@Test public void extractErrorMessageTest() throws Exception { final StatusNotifierCallbackTest.StatusNotifierCallbackImpl callbackTest = new StatusNotifierCallbackTest.StatusNotifierCallbackImpl(); final String address = "localhost"; BlazeMeterReport report = new BlazeMeterReport(); report.setToken("test_token"); Blaz...
@Override protected String extractErrorMessage(String response) { if (response != null && !response.isEmpty()) { try { JSON jsonResponse = JSONSerializer.toJSON(response, new JsonConfig()); if (jsonResponse instanceof JSONObject) { JSONObject object = (JSONObject) jsonResponse; JSONObject errorObj = object.getJSONObjec...
BlazeMeterHttpUtils extends HttpUtils { @Override protected String extractErrorMessage(String response) { if (response != null && !response.isEmpty()) { try { JSON jsonResponse = JSONSerializer.toJSON(response, new JsonConfig()); if (jsonResponse instanceof JSONObject) { JSONObject object = (JSONObject) jsonResponse; J...
BlazeMeterHttpUtils extends HttpUtils { @Override protected String extractErrorMessage(String response) { if (response != null && !response.isEmpty()) { try { JSON jsonResponse = JSONSerializer.toJSON(response, new JsonConfig()); if (jsonResponse instanceof JSONObject) { JSONObject object = (JSONObject) jsonResponse; J...
BlazeMeterHttpUtils extends HttpUtils { @Override protected String extractErrorMessage(String response) { if (response != null && !response.isEmpty()) { try { JSON jsonResponse = JSONSerializer.toJSON(response, new JsonConfig()); if (jsonResponse instanceof JSONObject) { JSONObject object = (JSONObject) jsonResponse; J...
BlazeMeterHttpUtils extends HttpUtils { @Override protected String extractErrorMessage(String response) { if (response != null && !response.isEmpty()) { try { JSON jsonResponse = JSONSerializer.toJSON(response, new JsonConfig()); if (jsonResponse instanceof JSONObject) { JSONObject object = (JSONObject) jsonResponse; J...
@Test public void testConvert() throws Exception { List<SampleResult> list = new LinkedList<>(); list.add(new SampleResult(System.currentTimeMillis(), 1)); list.add(new SampleResult(System.currentTimeMillis() + 1000, 1)); list.add(new SampleResult(System.currentTimeMillis() + 2000, 1)); list.add(new SampleResult(System...
public static JSONObject convertToJSON(List<SampleResult> accumulatedValues, List<SampleResult> intervalValues) { JSONObject result = new JSONObject(); result.put("labels", getLabels(accumulatedValues, intervalValues)); return result; }
JSONConverter { public static JSONObject convertToJSON(List<SampleResult> accumulatedValues, List<SampleResult> intervalValues) { JSONObject result = new JSONObject(); result.put("labels", getLabels(accumulatedValues, intervalValues)); return result; } }
JSONConverter { public static JSONObject convertToJSON(List<SampleResult> accumulatedValues, List<SampleResult> intervalValues) { JSONObject result = new JSONObject(); result.put("labels", getLabels(accumulatedValues, intervalValues)); return result; } }
JSONConverter { public static JSONObject convertToJSON(List<SampleResult> accumulatedValues, List<SampleResult> intervalValues) { JSONObject result = new JSONObject(); result.put("labels", getLabels(accumulatedValues, intervalValues)); return result; } static JSONObject convertToJSON(List<SampleResult> accumulatedValu...
JSONConverter { public static JSONObject convertToJSON(List<SampleResult> accumulatedValues, List<SampleResult> intervalValues) { JSONObject result = new JSONObject(); result.put("labels", getLabels(accumulatedValues, intervalValues)); return result; } static JSONObject convertToJSON(List<SampleResult> accumulatedValu...
@Test public void testFlow() throws Exception { StatusNotifierCallbackTest.StatusNotifierCallbackImpl notifier = new StatusNotifierCallbackTest.StatusNotifierCallbackImpl(); BlazeMeterHttpUtilsEmul emul = new BlazeMeterHttpUtilsEmul(notifier, "test_address", "test_data_address", new BlazeMeterReport()); JSONObject resu...
public String makeReportPublic() throws IOException { String uri = httpUtils.getAddress() + String.format("/api/v4/masters/%s/public-token", getId()); JSONObject obj = new JSONObject(); obj.put("publicToken", "None"); JSONObject response = httpUtils.queryObject(httpUtils.createPost(uri, obj.toString()), 201); return ht...
Master extends BZAObject { public String makeReportPublic() throws IOException { String uri = httpUtils.getAddress() + String.format("/api/v4/masters/%s/public-token", getId()); JSONObject obj = new JSONObject(); obj.put("publicToken", "None"); JSONObject response = httpUtils.queryObject(httpUtils.createPost(uri, obj.t...
Master extends BZAObject { public String makeReportPublic() throws IOException { String uri = httpUtils.getAddress() + String.format("/api/v4/masters/%s/public-token", getId()); JSONObject obj = new JSONObject(); obj.put("publicToken", "None"); JSONObject response = httpUtils.queryObject(httpUtils.createPost(uri, obj.t...
Master extends BZAObject { public String makeReportPublic() throws IOException { String uri = httpUtils.getAddress() + String.format("/api/v4/masters/%s/public-token", getId()); JSONObject obj = new JSONObject(); obj.put("publicToken", "None"); JSONObject response = httpUtils.queryObject(httpUtils.createPost(uri, obj.t...
Master extends BZAObject { public String makeReportPublic() throws IOException { String uri = httpUtils.getAddress() + String.format("/api/v4/masters/%s/public-token", getId()); JSONObject obj = new JSONObject(); obj.put("publicToken", "None"); JSONObject response = httpUtils.queryObject(httpUtils.createPost(uri, obj.t...
@Test public void testFromJSON() throws Exception { StatusNotifierCallbackTest.StatusNotifierCallbackImpl notifier = new StatusNotifierCallbackTest.StatusNotifierCallbackImpl(); BlazeMeterHttpUtilsEmul emul = new BlazeMeterHttpUtilsEmul(notifier, "test_address", "test_data_address", new BlazeMeterReport()); JSONObject ...
public static Master fromJSON(HttpUtils httpUtils, JSONObject obj) { return new Master(httpUtils, obj.getString("id"), obj.getString("name")); }
Master extends BZAObject { public static Master fromJSON(HttpUtils httpUtils, JSONObject obj) { return new Master(httpUtils, obj.getString("id"), obj.getString("name")); } }
Master extends BZAObject { public static Master fromJSON(HttpUtils httpUtils, JSONObject obj) { return new Master(httpUtils, obj.getString("id"), obj.getString("name")); } Master(HttpUtils httpUtils, String id, String name); }
Master extends BZAObject { public static Master fromJSON(HttpUtils httpUtils, JSONObject obj) { return new Master(httpUtils, obj.getString("id"), obj.getString("name")); } Master(HttpUtils httpUtils, String id, String name); String makeReportPublic(); static Master fromJSON(HttpUtils httpUtils, JSONObject obj); }
Master extends BZAObject { public static Master fromJSON(HttpUtils httpUtils, JSONObject obj) { return new Master(httpUtils, obj.getString("id"), obj.getString("name")); } Master(HttpUtils httpUtils, String id, String name); String makeReportPublic(); static Master fromJSON(HttpUtils httpUtils, JSONObject obj); }
@Test public void testFromJSON() throws Exception { StatusNotifierCallbackTest.StatusNotifierCallbackImpl notifier = new StatusNotifierCallbackTest.StatusNotifierCallbackImpl(); BlazeMeterHttpUtilsEmul emul = new BlazeMeterHttpUtilsEmul(notifier, "test_address", "test_data_address", new BlazeMeterReport()); JSONObject ...
public static Account fromJSON(HttpUtils httpUtils, JSONObject obj) { return new Account(httpUtils, obj.getString("id"), obj.getString("name")); }
Account extends BZAObject { public static Account fromJSON(HttpUtils httpUtils, JSONObject obj) { return new Account(httpUtils, obj.getString("id"), obj.getString("name")); } }
Account extends BZAObject { public static Account fromJSON(HttpUtils httpUtils, JSONObject obj) { return new Account(httpUtils, obj.getString("id"), obj.getString("name")); } Account(HttpUtils httpUtils, String id, String name); }
Account extends BZAObject { public static Account fromJSON(HttpUtils httpUtils, JSONObject obj) { return new Account(httpUtils, obj.getString("id"), obj.getString("name")); } Account(HttpUtils httpUtils, String id, String name); Workspace createWorkspace(String name); List<Workspace> getWorkspaces(); static Account fro...
Account extends BZAObject { public static Account fromJSON(HttpUtils httpUtils, JSONObject obj) { return new Account(httpUtils, obj.getString("id"), obj.getString("name")); } Account(HttpUtils httpUtils, String id, String name); Workspace createWorkspace(String name); List<Workspace> getWorkspaces(); static Account fro...
@Test public void testThreadStopping() throws Exception { DirectoryListingConfig config = new DirectoryListingConfig(); File rootDir = TestDirectoryListingConfigActionTest.createFileTree(); setDirectoryConfig(config, rootDir.getAbsolutePath(), VARIABLE_NAME, true, false, false, false, true, false); final HashTree hashT...
@Override public void iterationStart(LoopIterationEvent loopIterationEvent) { boolean isIndependentListPerThread = getIndependentListPerThread(); if (!isIndependentListPerThread && directoryListingIterator == null) { throw new JMeterStopThreadException("All files in the directory have been passed."); } if (getIterator(...
DirectoryListingConfig extends ConfigTestElement implements NoThreadClone, LoopIterationListener, TestStateListener { @Override public void iterationStart(LoopIterationEvent loopIterationEvent) { boolean isIndependentListPerThread = getIndependentListPerThread(); if (!isIndependentListPerThread && directoryListingItera...
DirectoryListingConfig extends ConfigTestElement implements NoThreadClone, LoopIterationListener, TestStateListener { @Override public void iterationStart(LoopIterationEvent loopIterationEvent) { boolean isIndependentListPerThread = getIndependentListPerThread(); if (!isIndependentListPerThread && directoryListingItera...
DirectoryListingConfig extends ConfigTestElement implements NoThreadClone, LoopIterationListener, TestStateListener { @Override public void iterationStart(LoopIterationEvent loopIterationEvent) { boolean isIndependentListPerThread = getIndependentListPerThread(); if (!isIndependentListPerThread && directoryListingItera...
DirectoryListingConfig extends ConfigTestElement implements NoThreadClone, LoopIterationListener, TestStateListener { @Override public void iterationStart(LoopIterationEvent loopIterationEvent) { boolean isIndependentListPerThread = getIndependentListPerThread(); if (!isIndependentListPerThread && directoryListingItera...
@Test public void testReRead() throws Exception { File rootDir = TestDirectoryListingConfigActionTest.createFileTree(); List<File> etalonList = DirectoryListingIterator.getDirectoryListing(rootDir.getAbsoluteFile(), true); DirectoryListingIterator iterator = new DirectoryListingIterator( rootDir.getAbsolutePath(), fals...
protected List<File> getDirectoryListing() { try { return getDirectoryListing(new File(srcDir), isRecursiveListing); } catch (FileNotFoundException ex) { throw new RuntimeException(ex); } }
DirectoryListingIterator implements Iterator<File> { protected List<File> getDirectoryListing() { try { return getDirectoryListing(new File(srcDir), isRecursiveListing); } catch (FileNotFoundException ex) { throw new RuntimeException(ex); } } }
DirectoryListingIterator implements Iterator<File> { protected List<File> getDirectoryListing() { try { return getDirectoryListing(new File(srcDir), isRecursiveListing); } catch (FileNotFoundException ex) { throw new RuntimeException(ex); } } DirectoryListingIterator(String srcDir, b...
DirectoryListingIterator implements Iterator<File> { protected List<File> getDirectoryListing() { try { return getDirectoryListing(new File(srcDir), isRecursiveListing); } catch (FileNotFoundException ex) { throw new RuntimeException(ex); } } DirectoryListingIterator(String srcDir, b...
DirectoryListingIterator implements Iterator<File> { protected List<File> getDirectoryListing() { try { return getDirectoryListing(new File(srcDir), isRecursiveListing); } catch (FileNotFoundException ex) { throw new RuntimeException(ex); } } DirectoryListingIterator(String srcDir, b...
@Test public void testRewindWithRandom() throws Exception { File rootDir = TestDirectoryListingConfigActionTest.createFileTree(); List<File> etalonList = DirectoryListingIterator.getDirectoryListing(rootDir.getAbsoluteFile(), true); DirectoryListingIterator iterator = new DirectoryListingIterator( rootDir.getAbsolutePa...
protected List<File> getDirectoryListing() { try { return getDirectoryListing(new File(srcDir), isRecursiveListing); } catch (FileNotFoundException ex) { throw new RuntimeException(ex); } }
DirectoryListingIterator implements Iterator<File> { protected List<File> getDirectoryListing() { try { return getDirectoryListing(new File(srcDir), isRecursiveListing); } catch (FileNotFoundException ex) { throw new RuntimeException(ex); } } }
DirectoryListingIterator implements Iterator<File> { protected List<File> getDirectoryListing() { try { return getDirectoryListing(new File(srcDir), isRecursiveListing); } catch (FileNotFoundException ex) { throw new RuntimeException(ex); } } DirectoryListingIterator(String srcDir, b...
DirectoryListingIterator implements Iterator<File> { protected List<File> getDirectoryListing() { try { return getDirectoryListing(new File(srcDir), isRecursiveListing); } catch (FileNotFoundException ex) { throw new RuntimeException(ex); } } DirectoryListingIterator(String srcDir, b...
DirectoryListingIterator implements Iterator<File> { protected List<File> getDirectoryListing() { try { return getDirectoryListing(new File(srcDir), isRecursiveListing); } catch (FileNotFoundException ex) { throw new RuntimeException(ex); } } DirectoryListingIterator(String srcDir, b...