-
-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: raise an exception when the consumerVersionSelectors method has …
…the wrong signature #1594
- Loading branch information
1 parent
e924d80
commit dcfdb6a
Showing
6 changed files
with
82 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...ng/src/test/kotlin/au/com/dius/pact/provider/spring/junit5/ConsumerVersionSelectorTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package au.com.dius.pact.provider.spring.junit5 | ||
|
||
import au.com.dius.pact.provider.junitsupport.IgnoreNoPactsToVerify | ||
import au.com.dius.pact.provider.junitsupport.Provider | ||
import au.com.dius.pact.provider.junitsupport.loader.PactBroker | ||
import au.com.dius.pact.provider.junit5.PactVerificationContext | ||
import au.com.dius.pact.provider.junitsupport.loader.PactBrokerConsumerVersionSelectors | ||
import au.com.dius.pact.provider.junitsupport.loader.SelectorBuilder | ||
import org.junit.jupiter.api.Disabled | ||
import org.junit.jupiter.api.TestTemplate | ||
import org.junit.jupiter.api.extension.ExtendWith | ||
import org.springframework.boot.autoconfigure.SpringBootApplication | ||
import org.springframework.boot.test.context.SpringBootTest | ||
import org.springframework.test.context.junit.jupiter.SpringExtension | ||
|
||
@ExtendWith(SpringExtension::class) | ||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) | ||
@Provider("Animal Profile Service") | ||
@PactBroker | ||
@IgnoreNoPactsToVerify(ignoreIoErrors = "true") | ||
@Disabled | ||
open class ConsumerVersionSelectorTest { | ||
companion object { | ||
@PactBrokerConsumerVersionSelectors | ||
@JvmStatic | ||
fun consumerVersionSelectors() = SelectorBuilder().branch("current") | ||
} | ||
|
||
@TestTemplate | ||
@ExtendWith(PactVerificationSpringProvider::class) | ||
fun pactVerificationTestTemplate(context: PactVerificationContext?) { | ||
context?.verifyInteraction() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters