/** * If this result's related instance implements ITest or use @Test(testName=...), returns its test name, * otherwise returns null. */ @Override public String getTestName() { if (m_instance instanceof ITest) { return ((ITest) m_instance).getTestName(); } if (m_testClass.getTestName() != null) { return m_testClass.getTestName(); } return null; }
private void initTestClassesAndInstances() { // // TestClasses and instances // Object[] instances = getInstances(false); for (Object instance : instances) { if (instance instanceof ITest) { testName = ((ITest) instance).getTestName(); break; } } if (testName == null) { testName = iClass.getTestName(); } }
if (m_instance instanceof ITest) { m_name = ((ITest) m_instance).getTestName(); } else if (testClass.getTestName() != null) { m_name = testClass.getTestName(); } else { String string = m_instance.toString();
private void initTestClassesAndInstances() { // // TestClasses and instances // Object[] instances = getInstances(true, this.m_errorMsgPrefix); for (Object instance : instances) { instance = IParameterInfo.embeddedInstance(instance); if (instance instanceof ITest) { testName = ((ITest) instance).getTestName(); break; } } if (testName == null) { testName = iClass.getTestName(); } }