APISonar


org.testng.internal.Utils.log

> org > testng > internal > Utils > log
org APIs testng APIs internal APIs Utils APIs log APIs

Example 1
private List<XmlClass> initializeXmlClasses() {
    List<XmlClass> result= Lists.newArrayList();
    try {
      String[] classes = PackageUtils.findClassesInPackage(m_name, m_include, m_exclude);
      
      for(String className: classes) {
        result.add(new XmlClass(className, Boolean.FALSE));
      }
    }
    catch(IOException ioex) {
      Utils.log("XmlPackage", 1, ioex.getMessage());
    }
    
    return result;
  }
Example 2
private static ConstructorOrMethod getMethod(Test t) {
    String name = null;
    try {
      Method nameMethod = t.getClass().getMethod("getName");
      name = (String) nameMethod.invoke(t);
      return new ConstructorOrMethod(t.getClass().getMethod(name));
    } catch (Throwable th) {
      Utils.log(
          "JUnit3TestMethod",
          2,
          "Method '" + name + "' not found in class '" + t + "': " + th.getMessage());
      return null;
    }
  }
Example 3
private String getOutputDirectory(XmlSuite xmlSuite) {
    File fileResult =
        new File(m_outputDirectory + File.separatorChar + xmlSuite.getName()).getAbsoluteFile();
    if (!fileResult.exists()) {
      fileResult.mkdirs();
      if (!fileResult.exists()) {
        Utils.log(
            "Reports", 2, "Problem creating output directory " + fileResult.getAbsolutePath());
      }
    }
    return fileResult.getAbsolutePath();
  }