@Override public int compare(IMethodInstance o1, IMethodInstance o2) { XmlTest test1 = o1.getMethod().getTestClass().getXmlTest(); XmlTest test2 = o2.getMethod().getTestClass().getXmlTest();
public NoOpTestClass(ITestClass testClass) { m_testClass= testClass.getRealClass(); m_beforeSuiteMethods= testClass.getBeforeSuiteMethods(); m_beforeTestConfMethods= testClass.getBeforeTestConfigurationMethods(); m_beforeGroupsMethods= testClass.getBeforeGroupsMethods(); m_beforeClassMethods= testClass.getBeforeClassMethods(); m_beforeTestMethods= testClass.getBeforeTestMethods(); m_afterSuiteMethods= testClass.getAfterSuiteMethods(); m_afterTestConfMethods= testClass.getAfterTestConfigurationMethods(); m_afterGroupsMethods= testClass.getAfterGroupsMethods(); m_afterClassMethods= testClass.getAfterClassMethods(); m_afterTestMethods= testClass.getAfterTestMethods(); m_instances= testClass.getInstances(true); m_instanceHashes= testClass.getInstanceHashCodes(); m_xmlTest = testClass.getXmlTest(); m_xmlClass = testClass.getXmlClass(); }
@Override public int compare(IMethodInstance o1, IMethodInstance o2) { XmlTest test1 = o1.getMethod().getTestClass().getXmlTest(); XmlTest test2 = o2.getMethod().getTestClass().getXmlTest();
public NoOpTestClass(ITestClass testClass) { m_testClass = testClass.getRealClass(); m_beforeSuiteMethods = testClass.getBeforeSuiteMethods(); m_beforeTestConfMethods = testClass.getBeforeTestConfigurationMethods(); m_beforeGroupsMethods = testClass.getBeforeGroupsMethods(); m_beforeClassMethods = testClass.getBeforeClassMethods(); m_beforeTestMethods = testClass.getBeforeTestMethods(); m_afterSuiteMethods = testClass.getAfterSuiteMethods(); m_afterTestConfMethods = testClass.getAfterTestConfigurationMethods(); m_afterGroupsMethods = testClass.getAfterGroupsMethods(); m_afterClassMethods = testClass.getAfterClassMethods(); m_afterTestMethods = testClass.getAfterTestMethods(); m_instances = testClass.getInstances(true); m_instanceHashes = testClass.getInstanceHashCodes(); m_xmlTest = testClass.getXmlTest(); m_xmlClass = testClass.getXmlClass(); }
/** * @param testClass * @param mi */ private void onceAfterClass(ITestClass testClass, IMethodInstance mi) { getDelegate(testClass.getXmlTest()).onAfterClass(testClass, mi); }
private void onceBeforeClass(ITestClass testClass, IMethodInstance mi) { getDelegate(testClass.getXmlTest()).onBeforeClass(testClass, mi); }
/** * If suite is already created (is present in hashmap) return it; otherwise * create the suite object, save it in DB and save it into hashmap. * * @param methodResult the method result * @return the suite */ protected Suite saveSuite(ITestResult methodResult) { synchronized (suites) { XmlSuite xmlsuite = methodResult.getMethod().getTestClass() .getXmlTest().getSuite(); Suite suite = suites.get(xmlsuite); if (suite == null) { suite = new Suite(); suite.setName(xmlsuite.getName()); suite.setStartDate(new Date()); saveObject(suite); suites.put(xmlsuite, suite); } return suite; } }