All Downloads are FREE. Search and download functionalities are using the official Maven repository.

Download all versions of pact-jvm-provider-junit_2.11 JAR files with all dependencies

Search JAR files by class name

pact-jvm-provider-junit_2.11 from group au.com.dius (version 2.4.0)

# Pact junit runner ## Overview Library provides ability to play contract tests against provider service in JUnit fashionable way. Supports: - Out-of-the-box convenient ways to load pacts - Easy way to change assertion strategy - **org.junit.BeforeClass**, **org.junit.AfterClass** and **org.junit.ClassRule** JUnit annotations, that will be run once - before/after whole contract test suite - **org.junit.Before**, **org.junit.After** and **org.junit.Rule** JUnit annotations, that will be run before/after each test of interaction - **au.com.dius.pact.provider.junit.State** custom annotation - before each interaction that require state change, all methods annotated by State with appropriate state listed will be invoked ## Example of test ```java @RunWith(PactRunner.class) // Say JUnit to run tests with custom Runner @Provider("myAwesomeService") // Set up name of tested provider @PactFolder("pacts") // Point where to find pacts (See also section Pacts source in documentation) public class ContractTest { // NOTE: this is just an example of embedded service that listens to requests, you should start here real service @ClassRule //Rule will be applied once: before/after whole contract test suite public static final ClientDriverRule embeddedService = new ClientDriverRule(8332); @BeforeClass //Method will be run once: before whole contract test suite public static void setUpService() { //Run DB, create schema //Run service //... } @Before //Method will be run before each test of interaction public void before() { // Rest data // Mock dependent service responses // ... embeddedService.addExpectation( onRequestTo("/data"), giveEmptyResponse() ); } @State("default", "no-data") // Method will be run before testing interactions that require "default" or "no-data" state public void toDefaultState() { // Prepare service before interaction that require "default" state // ... System.out.println("Now service in default state"); } @TestTarget // Annotation denotes Target that will be used for tests public final Target target = new HttpTarget(8332); // Out-of-the-box implementation of Target (for more information take a look at Test Target section) } ``` ## Pacts source Pact runner will automatically collect pacts: for this purpose there are 2 out-of-the-box options or you can easily add your own Pact source. **Note:** it's possible to use only one source of pacts. ### Download pacts from pact-broker To use pacts from Pact Broker annotate test class with `@PactBroker(host="host.of.pact.broker.com", port = 80)`. ### Pact folder To use pacts from resource folder of project annotate test class with `@PactFolder("subfolder/in/resource/directory")`. ### Custom pacts source It's possible to use custom Pact source: for this implement `interface au.com.dius.pact.provider.junit.loader.PactLoader` and annotate test class with `@PactSource(MyOwnPactLoader.class)`. **Note:** `class MyOwnPactLoader` should have default constructor. ## Test target Field in test class of type `au.com.dius.pact.provider.junit.target.Target` annotated with `au.com.dius.pact.provider.junit.target.TestTarget` will be used for actual Interaction execution and asserting of contract. **Note:** should be exactly 1 such field, otherwise `InitializationException` will be thrown. ### HttpTarget `au.com.dius.pact.provider.junit.target.HttpTarget` - out-of-the-box implementation of `au.com.dius.pact.provider.junit.target.Target` that will play pacts as http request and assert response from service by matching rules from pact. ### Custom Test Target It's possible to use custom `Target` for that `interface Target` should be implemented and this class can be used instead of `HttpTarget`.

Group: au.com.dius Artifact: pact-jvm-provider-junit_2.11
Show documentation Show source 
 

9 downloads
Artifact pact-jvm-provider-junit_2.11
Group au.com.dius
Version 2.4.0
Last update 22. November 2015
Tags: test runwith otherwise supports schema annotation exactly only afterclass listed final information host static once loader interaction prepare asserting create responses project system fashionable addexpectation start pactloader http will load each ways port before dependent data easily execution easy tests embeddedservice httptarget clientdriverrule note ability options just look initializationexception mock implemented void should field folder point overview directory library myawesomeservice documentation assert testing method annotations broker public pactsource methods beforeclass change download type used where after requests more println request pactbroker contracttest custom pactrunner thrown appropriate such contract classrule setupservice class here embedded denotes that default matching pact whole against todefaultstate onrequestto require subfolder rest example suite this collect have testtarget state invoked annotated purpose from listens tested response real possible automatically name rule pactfolder implement find interactions constructor with your play resource strategy provides provider giveemptyresponse junit assertion interface annotate section rules convenient source implementation take applied there service target myownpactloader instead actual java runner 8332 also pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 11
Dependencies junit, scala-compiler, guava-retrying, pact-jvm-provider_2.11, fluent-hc, httpclient, commons-lang3, slf4j-api, pact-jvm-model_2.11, jackson-databind, scala-library,
There are maybe transitive dependencies!

pact-jvm-provider-junit_2.11 from group au.com.dius (version 3.1.3)

# Pact junit runner ## Overview Library provides ability to play contract tests against provider service in JUnit fashionable way. Supports: - Out-of-the-box convenient ways to load pacts - Easy way to change assertion strategy - **org.junit.BeforeClass**, **org.junit.AfterClass** and **org.junit.ClassRule** JUnit annotations, that will be run once - before/after whole contract test suite - **org.junit.Before**, **org.junit.After** and **org.junit.Rule** JUnit annotations, that will be run before/after each test of interaction - **au.com.dius.pact.provider.junit.State** custom annotation - before each interaction that require state change, all methods annotated by State with appropriate state listed will be invoked ## Example of test ```java @RunWith(PactRunner.class) // Say JUnit to run tests with custom Runner @Provider("myAwesomeService") // Set up name of tested provider @PactFolder("pacts") // Point where to find pacts (See also section Pacts source in documentation) public class ContractTest { // NOTE: this is just an example of embedded service that listens to requests, you should start here real service @ClassRule //Rule will be applied once: before/after whole contract test suite public static final ClientDriverRule embeddedService = new ClientDriverRule(8332); @BeforeClass //Method will be run once: before whole contract test suite public static void setUpService() { //Run DB, create schema //Run service //... } @Before //Method will be run before each test of interaction public void before() { // Rest data // Mock dependent service responses // ... embeddedService.addExpectation( onRequestTo("/data"), giveEmptyResponse() ); } @State("default", "no-data") // Method will be run before testing interactions that require "default" or "no-data" state public void toDefaultState() { // Prepare service before interaction that require "default" state // ... System.out.println("Now service in default state"); } @TestTarget // Annotation denotes Target that will be used for tests public final Target target = new HttpTarget(8332); // Out-of-the-box implementation of Target (for more information take a look at Test Target section) } ``` ## Pacts source Pact runner will automatically collect pacts: for this purpose there are 2 out-of-the-box options or you can easily add your own Pact source. **Note:** it's possible to use only one source of pacts. ### Download pacts from pact-broker To use pacts from Pact Broker annotate test class with `@PactBroker(host="host.of.pact.broker.com", port = 80)`. ### Pact folder To use pacts from resource folder of project annotate test class with `@PactFolder("subfolder/in/resource/directory")`. ### Custom pacts source It's possible to use custom Pact source: for this implement `interface au.com.dius.pact.provider.junit.loader.PactLoader` and annotate test class with `@PactSource(MyOwnPactLoader.class)`. **Note:** `class MyOwnPactLoader` should have default constructor. ## Test target Field in test class of type `au.com.dius.pact.provider.junit.target.Target` annotated with `au.com.dius.pact.provider.junit.target.TestTarget` will be used for actual Interaction execution and asserting of contract. **Note:** should be exactly 1 such field, otherwise `InitializationException` will be thrown. ### HttpTarget `au.com.dius.pact.provider.junit.target.HttpTarget` - out-of-the-box implementation of `au.com.dius.pact.provider.junit.target.Target` that will play pacts as http request and assert response from service by matching rules from pact. ### Custom Test Target It's possible to use custom `Target` for that `interface Target` should be implemented and this class can be used instead of `HttpTarget`.

Group: au.com.dius Artifact: pact-jvm-provider-junit_2.11
Show documentation Show source 
 

9 downloads
Artifact pact-jvm-provider-junit_2.11
Group au.com.dius
Version 3.1.3
Last update 14. November 2015
Tags: test runwith otherwise supports schema annotation exactly only afterclass listed final information host static once loader interaction prepare asserting create responses project system fashionable addexpectation start pactloader http will load each ways port before dependent data easily execution easy tests embeddedservice httptarget clientdriverrule note ability options just look initializationexception mock implemented void should field folder point overview directory library myawesomeservice documentation assert testing method annotations broker public pactsource methods beforeclass change download type used where after requests more println request pactbroker contracttest custom pactrunner thrown appropriate such contract classrule setupservice class here embedded denotes that default matching pact whole against todefaultstate onrequestto require subfolder rest example suite this collect have testtarget state invoked annotated purpose from listens tested response real possible automatically name rule pactfolder implement find interactions constructor with your play resource strategy provides provider giveemptyresponse junit assertion interface annotate section rules convenient source implementation take applied there service target myownpactloader instead actual java runner 8332 also pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 13
Dependencies scala-logging_2.11, junit, pact-jvm-provider_2.11, json4s-native_2.11, guava-retrying, fluent-hc, httpclient, commons-lang3, slf4j-api, scala-xml_2.11, scala-library, json4s-jackson_2.11, pact-jvm-model_2.11,
There are maybe transitive dependencies!

pact-jvm-provider-junit_2.11 from group au.com.dius (version 2.3.3)

# Pact junit runner ## Overview Library provides ability to play contract tests against provider service in JUnit fashionable way. Supports: - Out-of-the-box convenient ways to load pacts - Easy way to change assertion strategy - **org.junit.BeforeClass**, **org.junit.AfterClass** and **org.junit.ClassRule** JUnit annotations, that will be run once - before/after whole contract test suite - **org.junit.Before**, **org.junit.After** and **org.junit.Rule** JUnit annotations, that will be run before/after each test of interaction - **au.com.dius.pact.provider.junit.State** custom annotation - before each interaction that require state change, all methods annotated by State with appropriate state listed will be invoked ## Example of test ```java @RunWith(PactRunner.class) // Say JUnit to run tests with custom Runner @Provider("myAwesomeService") // Set up name of tested provider @PactFolder("pacts") // Point where to find pacts (See also section Pacts source in documentation) public class ContractTest { // NOTE: this is just an example of embedded service that listens to requests, you should start here real service @ClassRule //Rule will be applied once: before/after whole contract test suite public static final ClientDriverRule embeddedService = new ClientDriverRule(8332); @BeforeClass //Method will be run once: before whole contract test suite public static void setUpService() { //Run DB, create schema //Run service //... } @Before //Method will be run before each test of interaction public void before() { // Rest data // Mock dependent service responses // ... embeddedService.addExpectation( onRequestTo("/data"), giveEmptyResponse() ); } @State("default", "no-data") // Method will be run before testing interactions that require "default" or "no-data" state public void toDefaultState() { // Prepare service before interaction that require "default" state // ... System.out.println("Now service in default state"); } @TestTarget // Annotation denotes Target that will be used for tests public final Target target = new HttpTarget(8332); // Out-of-the-box implementation of Target (for more information take a look at Test Target section) } ``` ## Pacts source Pact runner will automatically collect pacts: for this purpose there are 2 out-of-the-box options or you can easily add your own Pact source. **Note:** it's possible to use only one source of pacts. ### Download pacts from pact-broker To use pacts from Pact Broker annotate test class with `@PactBroker(host="host.of.pact.broker.com", port = 80)`. ### Pact folder To use pacts from resource folder of project annotate test class with `@PactFolder("subfolder/in/resource/directory")`. ### Custom pacts source It's possible to use custom Pact source: for this implement `interface au.com.dius.pact.provider.junit.loader.PactLoader` and annotate test class with `@PactSource(MyOwnPactLoader.class)`. **Note:** `class MyOwnPactLoader` should have default constructor. ## Test target Field in test class of type `au.com.dius.pact.provider.junit.target.Target` annotated with `au.com.dius.pact.provider.junit.target.TestTarget` will be used for actual Interaction execution and asserting of contract. **Note:** should be exactly 1 such field, otherwise `InitializationException` will be thrown. ### HttpTarget `au.com.dius.pact.provider.junit.target.HttpTarget` - out-of-the-box implementation of `au.com.dius.pact.provider.junit.target.Target` that will play pacts as http request and assert response from service by matching rules from pact. ### Custom Test Target It's possible to use custom `Target` for that `interface Target` should be implemented and this class can be used instead of `HttpTarget`.

Group: au.com.dius Artifact: pact-jvm-provider-junit_2.11
Show documentation Show source 
 

9 downloads
Artifact pact-jvm-provider-junit_2.11
Group au.com.dius
Version 2.3.3
Last update 14. November 2015
Tags: test runwith otherwise supports schema annotation exactly only afterclass listed final information host static once loader interaction prepare asserting create responses project system fashionable addexpectation start pactloader http will load each ways port before dependent data easily execution easy tests embeddedservice httptarget clientdriverrule note ability options just look initializationexception mock implemented void should field folder point overview directory library myawesomeservice documentation assert testing method annotations broker public pactsource methods beforeclass change download type used where after requests more println request pactbroker contracttest custom pactrunner thrown appropriate such contract classrule setupservice class here embedded denotes that default matching pact whole against todefaultstate onrequestto require subfolder rest example suite this collect have testtarget state invoked annotated purpose from listens tested response real possible automatically name rule pactfolder implement find interactions constructor with your play resource strategy provides provider giveemptyresponse junit assertion interface annotate section rules convenient source implementation take applied there service target myownpactloader instead actual java runner 8332 also pacts dius
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 12
Dependencies junit, json4s-native_2.11, pact-jvm-provider_2.11, guava-retrying, pact-jvm-model_2.11, fluent-hc, httpclient, commons-lang3, slf4j-api, json4s-jackson_2.11, scala-xml_2.11, scala-library,
There are maybe transitive dependencies!



Page 10 from 10 (items total 93)


© 2015 - 2024 Weber Informatics LLC | Privacy Policy