Interface ICCCompareSource

All Known Subinterfaces:
ICCImportResult, ICCResult
All Known Implementing Classes:
CCEmptyResult

public interface ICCCompareSource
This artifact will compare the passed source with the same named source in this artifact Exceptions are thrown if the current artifact doesn't contain source by the same name
Since:
10.0
  • Method Details

    • getAnnotatedSource

      InputStream getAnnotatedSource(ICCSource compareTo, boolean deltaOnly) throws IOException, CCAbstractException
      Given a result that contains the same source as the current result, compare the code coverage i.e. the previous result should call this method
      Parameters:
      compareTo - the name of the source the user wants to examine. i.e. the current source
      deltaOnly - if true will return the inputStream annotated only with the code coverage delta between the two sources. Will return all code coverage annotation otherwise.
      Returns:
      input stream with markers indicating coverage of desired and current result, or null if source doesn't match.
      Throws:
      IOException - thrown when given file is invalid and cannot be read or the stream (used in the implementation, not the return stream) cannot be written properly.
      CCAbstractException - thrown when deltaOnly is true and a file has been removed between the two results or both results have identical code coverage.
    • setAnnotatedMarker

      void setAnnotatedMarker(ICCCompareSource.MARKERTYPE type, String marker)
      Allow the user to change the annotation shown for a HitLine. Guarantees that spacing will remain consistent regardless of what marking is used. NOTE: Recommend adding a space after the desired marker to easier distinguish between marking columns and the source code.
      Parameters:
      type - the ICCCompareSource.MARKERTYPE of marker to be configured e.g. HITLINEMARKER
      marker - the character or string used to visualize the HitLine.