Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit a62b4f6

Browse files
committed
feat: Add no-config versions of runExample and runThrowingExample
1 parent f310dfb commit a62b4f6

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

src/main/java/io/contract_testing/contractcase/ContractDefiner.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,28 @@ public <T, M extends AnyMockDescriptor> void runExample(ExampleDefinition<M> def
2626
BoundaryConfigMapper.mapSuccessExample(additionalConfig, TEST_RUN_ID)));
2727
}
2828

29+
public <T, M extends AnyMockDescriptor> void runExample(ExampleDefinition<M> definition) {
30+
this.runExample(
31+
definition,
32+
IndividualSuccessTestConfig
33+
.IndividualSuccessTestConfigBuilder
34+
.builder()
35+
.build());
36+
}
37+
2938
public <T, M extends AnyMockDescriptor> void runThrowingExample(ExampleDefinition<M> definition,
3039
IndividualFailedTestConfig<T> additionalConfig) {
3140
BoundaryResultMapper.map(definer.runRejectingExample(BoundaryDefinitionMapper.map(definition),
3241
BoundaryConfigMapper.mapFailingExample(additionalConfig, TEST_RUN_ID)));
3342
}
3443

44+
public <T, M extends AnyMockDescriptor> void runThrowingExample(ExampleDefinition<M> definition) {
45+
this.runThrowingExample(
46+
definition,
47+
IndividualFailedTestConfig
48+
.IndividualFailedTestConfigBuilder
49+
.builder()
50+
.build());
51+
}
52+
3553
}

0 commit comments

Comments
 (0)