public class ThrowsReporter extends Object implements Reporter
That basic reporter simply allows to throw an AssertionError in case a mismatch is found in the approval files. It is always available since it’s only throwing a pure Java error, and requires no particular software or library to be present on the running machine.
| Constructor and Description |
|---|
ThrowsReporter() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAvailable()
A
ThrowsReporter is considered as always available since it has no external requirements at all. |
void |
mismatch(ApprovalFiles files)
A
Reporter is called whenever a difference is found while comparing the output of a Program Under Tests and the existing approved files linked to the tests. |
public void mismatch(ApprovalFiles files)
ReporterA Reporter is called whenever a difference is found while comparing the output of a Program Under Tests and the existing approved files linked to the tests. That method is the one which will be called by the framework, specifying the approved and received files which present differences.
It is then used to implement the behavior to execute for dealing with that mismatch between both files.
mismatch in interface Reporterfiles - the ApprovalFiles which holds the approved file (which contains the data reviewed and approved by the developer) and the temporary received file (which contains the data generated by the Program Under Tests)public boolean isAvailable()
A ThrowsReporter is considered as always available since it has no external requirements at all.
isAvailable in interface ReporterCopyright © 2018–2019 Write Them First!. All rights reserved.