From 5b163363a9a534961c3d71f411f5b1237aacb58c Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Tue, 19 Jul 2016 09:47:20 +0200 Subject: [PATCH] Removed ContractVerifierFilter fixes #42 --- .../src/main/asciidoc/verifier/messaging.adoc | 8 ++--- .../messaging/ContractVerifierFilter.java | 30 ------------------- 2 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 spring-cloud-contract-verifier/spring-cloud-contract-verifier-messaging/spring-cloud-contract-verifier-messaging-core/src/main/java/org/springframework/cloud/contract/verifier/messaging/ContractVerifierFilter.java diff --git a/docs/src/main/asciidoc/verifier/messaging.adoc b/docs/src/main/asciidoc/verifier/messaging.adoc index 1d28f80d7c..6eaac6af19 100644 --- a/docs/src/main/asciidoc/verifier/messaging.adoc +++ b/docs/src/main/asciidoc/verifier/messaging.adoc @@ -27,10 +27,8 @@ If you're using Spring Boot, the test configurations will be added automatically ==== Manual Integration Testing -The `spring-cloud-contract-verifier-messaging-core` module contains 2 main interfaces: - -- `ContractVerifierMessageExchange` - class that allows you to build, send and receive messages -- `ContractVerifierFilter` - interface to filter out the messages that do not follow the pattern from the DSL +The `spring-cloud-contract-verifier-messaging-core` module contains `ContractVerifierMessageExchange`, +class that allows you to build, send and receive messages In the a test you can inject a `ContractVerifierMessageExchange` to send and receive messages that follow the contract. @@ -146,7 +144,7 @@ include::{verifier_core_path}/src/test/groovy/org/springframework/cloud/contract Unlike the HTTP part - in Messaging we need to publish the Groovy DSL inside the JAR with a stub. Then it's parsed on the consumer side and proper stubbed routes are created. -For more infromation please consult the Stub Runner Messaging sections. +For more information please consult the Stub Runner Messaging sections. ===== Gradle Setup diff --git a/spring-cloud-contract-verifier/spring-cloud-contract-verifier-messaging/spring-cloud-contract-verifier-messaging-core/src/main/java/org/springframework/cloud/contract/verifier/messaging/ContractVerifierFilter.java b/spring-cloud-contract-verifier/spring-cloud-contract-verifier-messaging/spring-cloud-contract-verifier-messaging-core/src/main/java/org/springframework/cloud/contract/verifier/messaging/ContractVerifierFilter.java deleted file mode 100644 index 7c706a9786..0000000000 --- a/spring-cloud-contract-verifier/spring-cloud-contract-verifier-messaging/spring-cloud-contract-verifier-messaging-core/src/main/java/org/springframework/cloud/contract/verifier/messaging/ContractVerifierFilter.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2013-2016 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.cloud.contract.verifier.messaging; - -/** - * Contract for filtering out messages that do not match the structure in the Contract DSL - * - * @author Marcin Grzejszczak - */ -public interface ContractVerifierFilter { - - /** - * @return @{code true} if the message should be passed through, @{code false} if the message should be filtered out, - */ - boolean matches(M message); -}