public TestSession getTestSession() { return new TestSession(testSession); } }
@Override public String toString() { return getCode(); } }
public boolean isTestSession(TestSession testSession) { return testSession != null && testSession.equals(this.testSession); } public boolean isValid() { return (!isEmpty(testSession.getValue())) && (!isEmpty(id)); }
public String getOwner() { if (owner == null) return TestSession.DEFAULT_TEST_SESSION.getValue(); return owner; }
public SiteSpec copy() { SiteSpec siteSpec = new SiteSpec(); siteSpec.setSaml(isSaml); siteSpec.setStsAssertion(stsAssertion); siteSpec.setGazelleXuaUsername(getGazelleXuaUsername()); siteSpec.setName(name); siteSpec.setActorType(actorType); siteSpec.testSession = new TestSession(testSession.toString()); return siteSpec; }
public TestCollectionCode(String code) { setCode(code); }
@Override public int hashCode() { int result = testSession != null ? testSession.hashCode() : 0; result = 31 * result + (id != null ? id.hashCode() : 0); return result; }
public boolean isOption() { return collectionID.toString().contains("_"); }
private boolean hasTestCollection(List<TestCollectionDefinitionDAO> daos, TestCollectionCode tcId) { for (TestCollectionDefinitionDAO dao : daos) { if (dao.getCollectionID().equals(tcId)) return true; } return false; }
@Override public String toString() { return testSession.getValue() + "/" + name; }
public TestKitSearchPath(String environment, String testSession) { this(environment, new TestSession(testSession)); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SimId simId = (SimId) o; if (testSession != null ? !testSession.equals(simId.testSession) : simId.testSession != null) return false; return id != null ? id.equals(simId.id) : simId.id == null; }
public File getSessionDir(TestSession testSession) { return new File(cache + File.separator + testSession.getValue()); } }
public void createTestSession(String name) throws Exception { TestSessionServiceManager.INSTANCE.create(new TestSession(name)); }
public String validateState() { StringBuilder buf = new StringBuilder(); if (testSession == null || testSession.equals("")) buf.append("No testSession specified\n"); if (id == null || id.equals("")) buf.append("No id specified\n"); if (actorType == null || actorType.equals("")) buf.append("No actorType specified\n"); if (environmentName == null || environmentName.equals("")) buf.append("No environmentName specified"); if (buf.length() == 0) return null; // no errors return buf.toString(); }
public List<Result> runTest(TestSession testSession, String siteName, TestInstance testInstance, List<String> sections, Map<String, String> params, boolean stopOnFirstFailure) throws Exception { return runTest(testSession.getValue(),siteName,false,testInstance,sections,params,stopOnFirstFailure); }
public boolean isValid() { return (!isEmpty(testSession.getValue())) && (!isEmpty(id)); } public void setValid(boolean x) { }
private TestSession getTestSession(List<Site> sites) { for (Site s : sites) { if (!s.getTestSession().equals(TestSession.DEFAULT_TEST_SESSION)) return s.getTestSession(); } return TestSession.DEFAULT_TEST_SESSION; }
private TestSession testSessionFromCollection(Collection<Site> sites) { for (Site site : sites) { if (site.getTestSession() != null && !site.getTestSession().equals(TestSession.DEFAULT_TEST_SESSION)) return site.getTestSession(); } return TestSession.DEFAULT_TEST_SESSION; }