StringSuffix
Matches any string that begins with a matchable prefix, and ends with a constant suffix.
At match time, the actual string is checked for the expected constant suffix, and then the beginning of the string is passed to the prefix matcher.
The prefix matcher must be expecting a string.
See also StringPrefix
- Typescript
- Java
import { matchers } from '@contract-case/case-definition-dsl'
new matchers.strings.StringSuffix(prefix: any, suffix: string)
Parameters
Name | Type | Description |
---|---|---|
prefix | any | A string or matcher to match against the prefix. If you don't mind what the prefix is, pass null / undefined |
suffix | string | The suffix for the matched string. Must be a string and not a matcher |
import io.contract_testing.contractcase.definitions.matchers.strings.StringSuffix;
new StringSuffix(java.lang.Object prefix, java.lang.String suffix);
Parameters
Name | Type | Description |
---|---|---|
prefix | java.lang.Object | A string or matcher to match against the prefix. If you don't mind what the prefix is, pass null / undefined |
suffix | java.lang.String | The suffix for the matched string. Must be a string and not a matcher |