Class StatusCounter
java.lang.Object
net.masterthought.cucumber.json.support.StatusCounter
Keeps information about statuses occurrence.
- Author:
- Damian Szczepanik (damianszczepanik@github)
-
Constructor Summary
ConstructorsConstructorDescriptionStatusCounter(Resultsable[] resultsables) StatusCounter(Resultsable[] resultsables, Set<Status> notFailingStatuses) -
Method Summary
Modifier and TypeMethodDescriptionIf statuses for all items are the same then this finalStatus is returned, otherwiseStatus.FAILED.intgetValueFor(Status status) Gets the number of occurrences for given status.voidincrementFor(Status status) Increments finalStatus counter by single value.intsize()Gets the sum of all occurrences for all statuses.
-
Constructor Details
-
StatusCounter
-
StatusCounter
-
StatusCounter
public StatusCounter()
-
-
Method Details
-
incrementFor
Increments finalStatus counter by single value.- Parameters:
status- finalStatus for which the counter should be incremented.
-
getValueFor
Gets the number of occurrences for given status.- Parameters:
status- the status- Returns:
- number of occurrences for given status
-
size
public int size()Gets the sum of all occurrences for all statuses.- Returns:
- sum of all occurrences for all statuses
-
getFinalStatus
If statuses for all items are the same then this finalStatus is returned, otherwiseStatus.FAILED.- Returns:
- final status for this counter
-