Tabnine Logo
com.novocode.junit
Code IndexAdd Tabnine to your IDE (free)

How to use com.novocode.junit

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

origin: com.novocode/junit-interface

@Override
public void testFinished(Description desc)
{
 uncapture(false);
 postIfFirst(new InfoEvent(desc, Status.Success) {
  void logTo(RichLogger logger) {
   logger.debug("Test "+ansiName+" finished" + durationSuffix());
  }
 });
 logger.popCurrentTestClassName();
}
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);
  }
 });
}
origin: com.novocode/junit-interface

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

@Override
public void testStarted(Description description)
{
 recordStartTime(description);
 logger.pushCurrentTestClassName(description.getClassName());
 debugOrInfo("Test " + settings.buildInfoName(description) + " started");
 capture();
}
origin: com.novocode/junit-interface

void uncapture(boolean replay)
{
 if(settings.quiet && capture != null)
 {
  capture.stop();
  if(replay)
  {
   try { capture.replay(); }
   catch(IOException ex) { logger.error("Error replaying captured stdio", ex); }
  }
  capture = null;
 }
}
origin: com.novocode/junit-interface

@Override
public void testAssumptionFailure(final Failure failure)
{
 uncapture(true);
 postIfFirst(new ErrorEvent(failure, Status.Skipped) {
  void logTo(RichLogger logger) {
   logger.warn("Test assumption in test "+ansiName+" failed: "+ansiMsg + durationSuffix());
  }
 });
}
origin: com.novocode/junit-interface

 void logTo(RichLogger logger) {
  logger.warn("Test assumption in test "+ansiName+" failed: "+ansiMsg + durationSuffix());
 }
});
origin: com.novocode/junit-interface

 void logTo(RichLogger logger) {
  logger.debug("Test "+ansiName+" finished" + durationSuffix());
 }
});
origin: com.novocode/junit-interface

 void logTo(RichLogger logger) {
  logger.error("Test "+ansiName+" failed: "+ansiMsg + durationSuffix(), error);
 }
});
origin: com.novocode/junit-interface

void error(String s, Throwable t)
{
 error(s);
 if(t != null && (settings.logAssert || !(t instanceof AssertionError))) logStackTrace(t);
}
origin: com.novocode/junit-interface

 private void debugOrInfo(String msg)
 {
  if(settings.verbose) logger.info(msg);
  else logger.debug(msg);
 }
}
origin: com.novocode/junit-interface

/**
 * @return <tt>true</tt> if at least one (any) parent category match a child, otherwise <tt>false</tt>.
 * If empty <tt>parentCategories</tt>, returns <tt>false</tt>.
 */
private boolean matchesAnyParentCategories(Set<Class<?>> childCategories, Set<Class<?>> parentCategories) {
  for (Class<?> parentCategory : parentCategories) {
    if (hasAssignableTo(childCategories, parentCategory)) {
      return true;
    }
  }
  return false;
}
origin: com.novocode/junit-interface

protected CategoryFilter(boolean matchAnyIncludes, Set<Class<?>> includes,
             boolean matchAnyExcludes, Set<Class<?>> excludes) {
  includedAny = matchAnyIncludes;
  excludedAny = matchAnyExcludes;
  included = copyAndRefine(includes);
  excluded = copyAndRefine(excludes);
}
origin: com.novocode/junit-interface

/**
 * @see #toString()
 */
@Override
public String describe() {
  return toString();
}
origin: com.novocode/junit-interface

 InfoEvent(Description desc, Status status) {
  super(settings.buildInfoName(desc), null, status, elapsedTime(desc), null);
 }
}
origin: com.novocode/junit-interface

private void capture()
{
 if(settings.quiet && capture == null)
  capture = OutputCapture.start();
}
origin: com.novocode/junit-interface

@Override
public Task[] tasks(TaskDef[] taskDefs) {
 int length = taskDefs.length;
   Task[] tasks = new Task[length];
   for (int i = 0; i < length; i++) {
     TaskDef taskDef = taskDefs[i];
     tasks[i] = createTask(taskDef);
   }
   return tasks;
}
origin: com.novocode/junit-interface

@Override
public void testIgnored(Description desc)
{
 postIfFirst(new InfoEvent(desc, Status.Skipped) {
  void logTo(RichLogger logger) {
   logger.info("Test "+ansiName+" ignored");
  }
 });
}
origin: com.novocode/junit-interface

@Override
public void testFailure(final Failure failure)
{
 uncapture(true);
 postIfFirst(new ErrorEvent(failure, Status.Failure) {
  void logTo(RichLogger logger) {
   logger.error("Test "+ansiName+" failed: "+ansiMsg + durationSuffix(), error);
  }
 });
}
origin: com.novocode/junit-interface

/**
 * @return <tt>false</tt> if at least one parent category does not match children, otherwise <tt>true</tt>.
 * If empty <tt>parentCategories</tt>, returns <tt>true</tt>.
 */
private boolean matchesAllParentCategories(Set<Class<?>> childCategories, Set<Class<?>> parentCategories) {
  for (Class<?> parentCategory : parentCategories) {
    if (!hasAssignableTo(childCategories, parentCategory)) {
      return false;
    }
  }
  return true;
}
com.novocode.junit

Most used classes

  • CategoryFilter
    Copied from https://github.com/junit-team/junit/blob/master/src/main/java/org/junit/experimental/cat
  • OutputCapture
  • TestFilter
  • AbstractAnnotatedFingerprint
  • AbstractEvent
  • EmptyRunner,
  • EventDispatcher$1,
  • EventDispatcher$2,
  • EventDispatcher$3,
  • EventDispatcher$Event,
  • EventDispatcher,
  • GlobFilter,
  • JUnitRunner,
  • RichLogger,
  • RunSettings,
  • SilentFilterRequest
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