|
28 | 28 | import io.contract_testing.contractcase.grpc.ContractCaseStream.ContractCaseConfig; |
29 | 29 | import io.contract_testing.contractcase.grpc.ContractCaseStream.DefinitionRequest; |
30 | 30 | import io.contract_testing.contractcase.grpc.ContractCaseStream.DefinitionRequest.Builder; |
31 | | -import io.contract_testing.contractcase.grpc.ContractCaseStream.DefinitionResponse; |
| 31 | +import io.contract_testing.contractcase.grpc.ContractCaseStream.ContractResponse; |
32 | 32 | import io.contract_testing.contractcase.grpc.ContractCaseStream.EndDefinitionRequest; |
33 | 33 | import io.contract_testing.contractcase.grpc.ContractCaseStream.ResultResponse; |
34 | 34 | import io.contract_testing.contractcase.grpc.ContractCaseStream.ResultSuccess; |
@@ -242,7 +242,7 @@ private BoundaryResult begin(ContractCaseConfig wireConfig) { |
242 | 242 | private StreamObserver<DefinitionRequest> createConnection(ContractCaseStub asyncStub) { |
243 | 243 | return asyncStub.contractDefinition(new StreamObserver<>() { |
244 | 244 | @Override |
245 | | - public void onNext(DefinitionResponse note) { |
| 245 | + public void onNext(ContractResponse note) { |
246 | 246 | /* For when we receive messages from the server */ |
247 | 247 | final var requestId = ConnectorIncomingMapper.map(note.getId()); |
248 | 248 | switch (note.getKindCase()) { |
@@ -310,6 +310,10 @@ public void onNext(DefinitionResponse note) { |
310 | 310 | throw new ContractCaseCoreError("Received a message with no kind set", |
311 | 311 | "Java Internal Connector"); |
312 | 312 | } |
| 313 | + case START_TEST_EVENT -> { |
| 314 | + throw new ContractCaseCoreError("Received start test event incorrectly during a define contract", |
| 315 | + "Java Internal Connector"); |
| 316 | + } |
313 | 317 | } |
314 | 318 | } |
315 | 319 |
|
|
0 commit comments