-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Core] The SummaryPrinter should only depend on api classes
A plugin interface like the SummaryPrinter should only depend on classes in cucumber.api packages.
- Loading branch information
1 parent
8c69975
commit 9aea0fb
Showing
5 changed files
with
52 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
package cucumber.api; | ||
|
||
import cucumber.runtime.Runtime; | ||
|
||
/** | ||
* Interface for plugins that print a summary after test execution. | ||
* | ||
* @see Plugin | ||
*/ | ||
public interface SummaryPrinter extends Plugin { | ||
void print(Runtime runtime); | ||
/** | ||
* Handles the printing of the summary to the console | ||
* @param summaryPrinter Provides method to print the stats, errors and snippets | ||
*/ | ||
void print(SummaryPrintingInterface summaryPrinting); | ||
} |
31 changes: 31 additions & 0 deletions
31
core/src/main/java/cucumber/api/SummaryPrintingInterface.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package cucumber.api; | ||
|
||
import java.io.PrintStream; | ||
import java.util.List; | ||
|
||
/** | ||
* Provides methods for printing the statistics, errors and snippets to | ||
* a SummaryPrinter plugin. | ||
* | ||
*/ | ||
public interface SummaryPrintingInterface { | ||
/** | ||
* Prints the statistics to the PrintStream argument. | ||
* @param out The PrintStrema to print to. | ||
*/ | ||
void printStats(PrintStream out); | ||
|
||
/** | ||
* Returns the errors that occurred during the execution of the test cases | ||
* from the feature files. | ||
* @return the errors. | ||
*/ | ||
List<Throwable> getErrors(); | ||
|
||
/** | ||
* Returns the snippets created for the undefined steps encountered during | ||
* the execution of the test cases from the feature files. | ||
* @return the snippets. | ||
*/ | ||
List<String> getSnippets(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters