Beispiel #1
0
  /** @return Returns the isJUnit. */
  public boolean skipFailedInvocationCounts() {
    Boolean result = m_skipFailedInvocationCounts;
    if (null == result) {
      result = m_suite.skipFailedInvocationCounts();
    }

    return result;
  }
Beispiel #2
0
  /** @return Returns the isJUnit. */
  public boolean isJUnit() {
    Boolean result = m_isJUnit;
    if (null == result || XmlSuite.DEFAULT_JUNIT.equals(result)) {
      result = m_suite.isJUnit();
    }

    return result;
  }
Beispiel #3
0
  /** @return Returns the isJUnit. */
  public boolean isJUnit() {
    Boolean result = m_isJUnit;
    if (null == result) {
      result = m_suite.isJUnit();
    }

    return result;
  }
Beispiel #4
0
 private void init(XmlSuite suite, int index) {
   m_suite = suite;
   m_suite.getTests().add(this);
   m_index = index;
   // no two tests in the same suite should have the same name.
   // so, make the default test name unique
   m_name = TestNG.DEFAULT_COMMAND_LINE_TEST_NAME + " " + UUID.randomUUID().toString();
 }
Beispiel #5
0
  public String getPreserveOrder() {
    String result = m_preserveOrder;
    if (result == null || XmlSuite.DEFAULT_PRESERVE_ORDER.equals(m_verbose)) {
      result = m_suite.getPreserveOrder();
    }

    return result;
  }
Beispiel #6
0
  public String getParameter(String name) {
    String result = m_parameters.get(name);
    if (null == result) {
      result = m_suite.getParameter(name);
    }

    return result;
  }
Beispiel #7
0
  public String getParallel() {
    String result = null;
    if (null != m_parallel) {
      result = m_parallel;
    } else {
      result = m_suite.getParallel();
    }

    return result;
  }
Beispiel #8
0
  public String getTimeOut() {
    String result = null;
    if (null != m_timeOut) {
      result = m_timeOut;
    } else {
      result = m_suite.getTimeOut();
    }

    return result;
  }
Beispiel #9
0
  public String getParallel() {
    String result = null;
    if (null != m_parallel || XmlSuite.DEFAULT_PARALLEL.equals(m_parallel)) {
      result = m_parallel;
    } else {
      result = m_suite.getParallel();
    }

    return result;
  }
Beispiel #10
0
 public boolean getGroupByInstances() {
   Boolean result = m_groupByInstances;
   if (result == null || XmlSuite.DEFAULT_GROUP_BY_INSTANCES.equals(m_groupByInstances)) {
     result = m_suite.getGroupByInstances();
   }
   if (result != null) {
     return result.booleanValue();
   } else {
     return XmlSuite.DEFAULT_GROUP_BY_INSTANCES;
   }
 }
Beispiel #11
0
  /** @return Returns the verbose. */
  public int getVerbose() {
    Integer result = m_verbose;
    if (null == result || XmlSuite.DEFAULT_VERBOSE.equals(m_verbose)) {
      result = m_suite.getVerbose();
    }

    if (null != result) {
      return result.intValue();
    } else {
      return 1;
    }
  }
Beispiel #12
0
  /** @return Returns the verbose. */
  public int getVerbose() {
    Integer result = m_verbose;
    if (null == result) {
      result = m_suite.getVerbose();
    }

    if (null != result) {
      return result.intValue();
    } else {
      return 1;
    }
  }
Beispiel #13
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return XmlSuite.f();
   if (getClass() != obj.getClass()) return XmlSuite.f();
   XmlInclude other = (XmlInclude) obj;
   // if (m_index != other.m_index)
   // return XmlSuite.f();
   if (m_invocationNumbers == null) {
     if (other.m_invocationNumbers != null) return XmlSuite.f();
   } else if (!m_invocationNumbers.equals(other.m_invocationNumbers)) return XmlSuite.f();
   if (m_name == null) {
     if (other.m_name != null) return XmlSuite.f();
   } else if (!m_name.equals(other.m_name)) return XmlSuite.f();
   if (m_parameters == null) {
     if (other.m_parameters != null) {
       return XmlSuite.f();
     }
   } else if (!m_parameters.equals(other.m_parameters)) {
     return XmlSuite.f();
   }
   return true;
 }
Beispiel #14
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null) return XmlSuite.f();
    if (getClass() != obj.getClass()) return XmlSuite.f();
    XmlClass other = (XmlClass) obj;
    if (other.m_loadClasses != m_loadClasses
        || !m_excludedMethods.equals(other.m_excludedMethods)) {
      return XmlSuite.f();
    }
    if (m_includedMethods == null) {
      if (other.m_includedMethods != null) return XmlSuite.f();
    } else if (!m_includedMethods.equals(other.m_includedMethods)) return XmlSuite.f();
    //    if (m_index != other.m_index)
    //      return XmlSuite.f();
    if (m_name == null) {
      if (other.m_name != null) return XmlSuite.f();
    } else if (!m_name.equals(other.m_name)) return XmlSuite.f();

    return true;
  }
Beispiel #15
0
 /**
  * Constructs a <code>XmlTest</code> and adds it to suite's list of tests.
  *
  * @param suite the parent suite.
  */
 public XmlTest(XmlSuite suite) {
   m_suite = suite;
   m_suite.getTests().add(this);
 }
Beispiel #16
0
  @Override
  public boolean equals(Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null) return XmlSuite.f();
    if (getClass() != obj.getClass()) return XmlSuite.f();
    XmlTest other = (XmlTest) obj;
    if (m_excludedGroups == null) {
      if (other.m_excludedGroups != null) return XmlSuite.f();
    } else if (!m_excludedGroups.equals(other.m_excludedGroups)) return XmlSuite.f();
    //    if (m_expression == null) {
    //      if (other.m_expression != null)
    //        return XmlSuite.f();
    //    } else if (!m_expression.equals(other.m_expression))
    //      return XmlSuite.f();
    if (m_failedInvocationNumbers == null) {
      if (other.m_failedInvocationNumbers != null) return XmlSuite.f();
    } else if (!m_failedInvocationNumbers.equals(other.m_failedInvocationNumbers))
      return XmlSuite.f();
    if (m_includedGroups == null) {
      if (other.m_includedGroups != null) return XmlSuite.f();
    } else if (!m_includedGroups.equals(other.m_includedGroups)) return XmlSuite.f();
    if (m_isJUnit == null) {
      if (other.m_isJUnit != null && !other.m_isJUnit.equals(XmlSuite.DEFAULT_JUNIT))
        return XmlSuite.f();
    } else if (!m_isJUnit.equals(other.m_isJUnit)) return XmlSuite.f();
    if (m_metaGroups == null) {
      if (other.m_metaGroups != null) return XmlSuite.f();
    } else if (!m_metaGroups.equals(other.m_metaGroups)) return XmlSuite.f();
    if (m_methodSelectors == null) {
      if (other.m_methodSelectors != null) return XmlSuite.f();
    } else if (!m_methodSelectors.equals(other.m_methodSelectors)) return XmlSuite.f();
    if (m_name == null) {
      if (other.m_name != null) return XmlSuite.f();
    } else if (!m_name.equals(other.m_name)) return XmlSuite.f();
    if (m_parallel == null) {
      if (other.m_parallel != null) return XmlSuite.f();
    } else if (!m_parallel.equals(other.m_parallel)) return XmlSuite.f();
    if (m_parameters == null) {
      if (other.m_parameters != null) return XmlSuite.f();
    } else if (!m_parameters.equals(other.m_parameters)) return XmlSuite.f();
    if (m_preserveOrder == null) {
      if (other.m_preserveOrder != null) return XmlSuite.f();
    } else if (!m_preserveOrder.equals(other.m_preserveOrder)) return XmlSuite.f();
    if (m_skipFailedInvocationCounts == null) {
      if (other.m_skipFailedInvocationCounts != null) return XmlSuite.f();
    } else if (!m_skipFailedInvocationCounts.equals(other.m_skipFailedInvocationCounts))
      return XmlSuite.f();
    if (m_threadCount != other.m_threadCount) return XmlSuite.f();
    if (m_timeOut == null) {
      if (other.m_timeOut != null) return XmlSuite.f();
    } else if (!m_timeOut.equals(other.m_timeOut)) return XmlSuite.f();
    if (m_verbose == null) {
      if (other.m_verbose != null) return XmlSuite.f();
    } else if (!m_verbose.equals(other.m_verbose)) return XmlSuite.f();
    if (m_xmlClasses == null) {
      if (other.m_xmlClasses != null) return XmlSuite.f();
    } else if (!m_xmlClasses.equals(other.m_xmlClasses)) return XmlSuite.f();
    if (m_xmlPackages == null) {
      if (other.m_xmlPackages != null) return XmlSuite.f();
    } else if (!m_xmlPackages.equals(other.m_xmlPackages)) return XmlSuite.f();

    return true;
  }
Beispiel #17
0
 public String getAnnotations() {
   return null != m_annotations ? m_annotations.toString() : m_suite.getAnnotations();
 }
Beispiel #18
0
 /**
  * @return Returns the excludedGroups. Note: do not modify the returned value, use {@link
  *     #addExcludedGroup(String)}.
  */
 public List<String> getExcludedGroups() {
   List<String> result = new ArrayList(m_excludedGroups);
   result.addAll(m_suite.getExcludedGroups());
   return result;
 }