File tree Expand file tree Collapse file tree
packages/dsl-java/src/main/java/io/contract_testing/contractcase/configuration Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package io .contract_testing .contractcase .configuration ;
22
3- import io .contract_testing .contractcase .configuration .InteractionSetup ;
4-
53public interface TestErrorResponseFunction {
64
7- void call (Exception e , InteractionSetup config );
5+ /**
6+ * Called by the framework to test an exception that you expected to throw from your interaction.
7+ * <p>
8+ * Implement this method with whatever assertions and tests you need to verify that the exception
9+ * was the one you expected.
10+ *
11+ * @param e The exception thrown by your trigger function.
12+ * @param config the interaction setup, useful if you need state variables or other context
13+ * @throws Exception Any exceptions thrown during your verification. Throwing an exception from
14+ * this method will fail the interaction.
15+ */
16+ void call (Exception e , InteractionSetup config ) throws Exception ;
817}
Original file line number Diff line number Diff line change 11package io .contract_testing .contractcase .configuration ;
22
3- import io .contract_testing .contractcase .configuration .InteractionSetup ;
4-
53public interface TestResponseFunction <T > {
64
7- void call (T returnedObject , InteractionSetup config );
5+ /**
6+ * Called by the framework to test the response from your interaction's trigger function..
7+ * <p>
8+ * Implement this method with whatever assertions and tests you need to verify that you have
9+ * unmarshalled the expected object correctly.
10+ *
11+ * @param returnedObject The object returned from your trigger function.
12+ * @param config the interaction setup, useful if you need state variables or other
13+ * context
14+ * @throws Exception Any exceptions thrown during your verification. Throwing an exception from
15+ * this method will fail the interaction.
16+ */
17+ void call (T returnedObject , InteractionSetup config ) throws Exception ;
818}
You can’t perform that action at this time.
0 commit comments