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