getBehaviorDrivenDescription method
Gets the most appropriate BDD string based on the values set on the step.
Implementation
@override
String getBehaviorDrivenDescription(TestController tester) {
String result;
if (timeout == null) {
if (error == null) {
result = behaviorDrivenDescriptions[1];
} else {
result = behaviorDrivenDescriptions[3];
}
} else {
if (error == null) {
result = behaviorDrivenDescriptions[0];
} else {
result = behaviorDrivenDescriptions[2];
}
result = result.replaceAll(
'{{timeout}}',
timeout!.inSeconds.toString(),
);
}
result = result.replaceAll(
'{{caseSensitive}}',
caseSensitive ? 'sensitive' : 'insensitive',
);
result = result.replaceAll(
'{{equals}}',
equals ? 'equals' : 'does not equal',
);
result = result.replaceAll('{{testableId}}', testableId);
result = result.replaceAll('{{value}}', error ?? 'null');
return result;
}