Package org.jbehave.core.model
Class OutcomesTable
- java.lang.Object
-
- org.jbehave.core.model.OutcomesTable
-
public class OutcomesTable extends Object
Represents a tabular structure that holdsOutcomesTable.Outcome
s to be verified by invoking methodverify()
. If verification fails anOutcomesTable.OutcomesFailed
exception is thrown.The Outcomes Tables allows the specification of
Keywords
for the outcome fields, as well as rendering formats for different types. The default formats include:- Date: "EEE MMM dd hh:mm:ss zzz yyyy"
- Number: "0.###"
- Boolean: "yes,no"
getFormat(Type)
andgetFormat(String)
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OutcomesTable.FormatTypeInvalid
static class
OutcomesTable.Outcome<T>
static class
OutcomesTable.OutcomesFailed
-
Constructor Summary
Constructors Constructor Description OutcomesTable()
OutcomesTable(Map<Type,String> formats)
OutcomesTable(Keywords keywords)
OutcomesTable(Keywords keywords, String dateFormat)
Deprecated.OutcomesTable(Keywords keywords, Map<Type,String> formats)
-
Method Summary
Modifier and Type Method Description <T> void
addOutcome(String description, T value, org.hamcrest.Matcher<T> matcher)
String
asString()
UUIDExceptionWrapper
failureCause()
String
getDateFormat()
Deprecated.UsegetFormat(Type)
List<OutcomesTable.Outcome<?>>
getFailedOutcomes()
String
getFormat(Type type)
String
getFormat(String typeName)
Map<Type,String>
getFormats()
List<String>
getOutcomeFields()
List<OutcomesTable.Outcome<?>>
getOutcomes()
String
toString()
void
verify()
-
-
-
Constructor Detail
-
OutcomesTable
public OutcomesTable()
-
OutcomesTable
public OutcomesTable(Keywords keywords)
-
OutcomesTable
@Deprecated public OutcomesTable(Keywords keywords, String dateFormat)
Deprecated.Creates outcomes table using the specified keywords and date format
-
-
Method Detail
-
addOutcome
public <T> void addOutcome(String description, T value, org.hamcrest.Matcher<T> matcher)
-
verify
public void verify()
-
failureCause
public UUIDExceptionWrapper failureCause()
-
getOutcomes
public List<OutcomesTable.Outcome<?>> getOutcomes()
-
getFailedOutcomes
public List<OutcomesTable.Outcome<?>> getFailedOutcomes()
-
getDateFormat
@Deprecated public String getDateFormat()
Deprecated.UsegetFormat(Type)
Provides used date format
-
asString
public String asString()
-
-