congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Ansi.c
Code IndexAdd Tabnine to your IDE (free)

How to use
c
method
in
com.novocode.junit.Ansi

Best Java code snippets using com.novocode.junit.Ansi.c (Showing top 6 results out of 315)

origin: com.novocode/junit-interface

@Override
public void testRunStarted(Description description)
{
 debugOrInfo(c("Test run started", INFO));
}
origin: com.novocode/junit-interface

String buildColoredMessage(Throwable t, String c1) {
 if(t == null) return "null";
 if(!logExceptionClass || (!logAssert && (t instanceof AssertionError)))  return t.getMessage();
 StringBuilder b = new StringBuilder();
 String cn = decodeName(t.getClass().getName());
 int pos1 = cn.indexOf('$');
 int pos2 = pos1 == -1 ? cn.lastIndexOf('.') : cn.lastIndexOf('.', pos1);
 if(pos2 == -1) b.append(c(cn, c1));
 else {
  b.append(cn.substring(0, pos2));
  b.append('.');
  b.append(c(cn.substring(pos2+1), c1));
 }
 b.append(": ").append(t.getMessage());
 return b.toString();
}
origin: com.novocode/junit-interface

private String stackTraceElementToString(StackTraceElement e, String testClassName, String testFileName)
{
 boolean highlight = settings.color && (
   testClassName.equals(e.getClassName()) ||
   (testFileName != null && testFileName.equals(e.getFileName()))
  );
 StringBuilder b = new StringBuilder();
 b.append(settings.decodeName(e.getClassName() + '.' + e.getMethodName()));
 b.append('(');
 if(e.isNativeMethod()) b.append(c("Native Method", highlight ? TESTFILE2 : null));
 else if(e.getFileName() == null) b.append(c("Unknown Source", highlight ? TESTFILE2 : null));
 else
 {
  b.append(c(e.getFileName(), highlight ? TESTFILE1 : null));
  if(e.getLineNumber() >= 0)
   b.append(':').append(c(String.valueOf(e.getLineNumber()), highlight ? TESTFILE2 : null));
 }
 return b.append(')').toString();
}
origin: com.novocode/junit-interface

@Override
public void testRunFinished(Result result)
{
 debugOrInfo(c("Test run finished: ", INFO)+
  c(result.getFailureCount()+" failed", result.getFailureCount() > 0 ? ERRCOUNT : INFO)+
  c(", ", INFO)+
  c(result.getIgnoreCount()+" ignored", result.getIgnoreCount() > 0 ? IGNCOUNT : INFO)+
  c(", "+result.getRunCount()+" total, "+(result.getRunTime()/1000.0)+"s", INFO));
}
origin: com.novocode/junit-interface

private String buildColoredName(Description desc, String c1, String c2, String c3) {
 StringBuilder b = new StringBuilder();
 
 String cn = decodeName(desc.getClassName());
 int pos1 = cn.indexOf('$');
 int pos2 = pos1 == -1 ? cn.lastIndexOf('.') : cn.lastIndexOf('.', pos1);
 if(pos2 == -1) b.append(c(cn, c1));
 else {
  b.append(cn.substring(0, pos2));
  b.append('.');
  b.append(c(cn.substring(pos2+1), c1));
 }
 String m = desc.getMethodName();
 if(m != null) {
  b.append('.');
  int mpos1 = m.lastIndexOf('[');
  int mpos2 = m.lastIndexOf(']');
  if(mpos1 == -1 || mpos2 < mpos1) b.append(c(decodeName(m), c2));
  else {
   b.append(c(decodeName(m.substring(0, mpos1)), c2));
   b.append('[');
   b.append(c(m.substring(mpos1+1, mpos2), c3));
   b.append(']');
  }
 }
 return b.toString();
}
origin: com.novocode/junit-interface

void testExecutionFailed(String testName, Throwable err)
{
 post(new Event(Ansi.c(testName, Ansi.ERRMSG), settings.buildErrorMessage(err), Status.Error, 0l, err) {
  void logTo(RichLogger logger) {
   logger.error("Execution of test "+ansiName+" failed: "+ansiMsg, error);
  }
 });
}
com.novocode.junitAnsic

Popular methods of Ansi

  • filterAnsi

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now