/** * {@inheritDoc} */ @Override public Object[] getInstances() { return new Object[] { getInstance() }; }
private String computeSignature() { String classLong = m_method.getDeclaringClass().getName(); String cls = classLong.substring(classLong.lastIndexOf(".") + 1); StringBuilder result = stringify(cls, m_method); result .append("[pri:") .append(getPriority()) .append(", instance:") .append(getInstance()) .append(instanceParameters()) .append("]"); return result.toString(); }
/** * {@inheritDoc} Compares two BaseTestMethod using the test class then the associated * Java Method. */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } BaseTestMethod other = (BaseTestMethod) obj; boolean isEqual = m_testClass == null ? other.m_testClass == null : other.m_testClass != null && m_testClass.getRealClass().equals(other.m_testClass.getRealClass()) && m_instance == other.getInstance(); return isEqual && getConstructorOrMethod().equals(other.getConstructorOrMethod()); }
/** * {@inheritDoc} Compares two BaseTestMethod using the test class then the associated Java Method. */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } BaseTestMethod other = (BaseTestMethod) obj; boolean isEqual = m_testClass == null ? other.m_testClass == null : other.m_testClass != null && m_testClass.getRealClass().equals(other.m_testClass.getRealClass()) && getInstance() == other.getInstance(); return isEqual && getConstructorOrMethod().equals(other.getConstructorOrMethod()); }
protected void initGroups(Class<? extends ITestOrConfiguration> annotationClass) { ITestOrConfiguration annotation = getAnnotationFinder().findAnnotation(getConstructorOrMethod(), annotationClass); Object object = getInstance(); Class<?> clazz = getConstructorOrMethod().getDeclaringClass(); if (object != null) { clazz = object.getClass(); } ITestOrConfiguration classAnnotation = getAnnotationFinder().findAnnotation(clazz, annotationClass); setGroups( getStringArray( null != annotation ? annotation.getGroups() : null, null != classAnnotation ? classAnnotation.getGroups() : null)); initRestOfGroupDependencies(annotationClass); }