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

Download JAR files tagged by mocks with all dependencies

Search JAR files by class name

simplespec_2.9.1 from group com.simple (version 0.6.0)

simplespec is a thin Scala wrapper over JUnit, featuring Hamcrest matchers, easy mocks, and literate test descriptions.

Group: com.simple Artifact: simplespec_2.9.1
Show documentation Show source 
 

0 downloads
Artifact simplespec_2.9.1
Group com.simple
Version 0.6.0
Last update 15. May 2012
Organization not specified
URL https://github.com/SimpleFinance/simplespec
License The MIT License
Dependencies amount 3
Dependencies scala-library, junit, mockito-all,
There are maybe transitive dependencies!

ferris-junit from group org.ferris (version 0.0.1)

Ferris JUnit contains Mocks, Shunts, and other code useful in unit testing. 0.0.1 Transfer from Oak to Ferris

Group: org.ferris Artifact: ferris-junit

 

0 downloads
Artifact ferris-junit
Group org.ferris
Version 0.0.1
Last update 05. March 2010
Organization not specified
URL http://ferris.sourceforge.net/junit
License not specified
Dependencies amount 3
Dependencies persistence-api, log4j, junit,
There are maybe transitive dependencies!

wire-cucumber from group com.evanzeimet.wirecucumber (version 0.18.0)

The intent of this project is to make mocking external REST calls easier. This is achieved by standardizing how the mocks are configured and reducing the scaffolding needed to create and verify invocations of those mocks.

Group: com.evanzeimet.wirecucumber Artifact: wire-cucumber
Show all versions Show documentation Show source 
 

0 downloads
Artifact wire-cucumber
Group com.evanzeimet.wirecucumber
Version 0.18.0
Last update 21. March 2023
Organization not specified
URL https://github.com/podnov/wire-cucumber
License Apache License, Version 2.0
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!

assignables-core from group net.lepshi.commons (version 0.0.4)

This software library enables construction of complex POJO structures (Builder pattern) in a concise, beautiful way. It also supports construction of complex Mockito mocks enhancing readability of your unit tests.

Group: net.lepshi.commons Artifact: assignables-core
Show documentation Show source 
 

0 downloads
Artifact assignables-core
Group net.lepshi.commons
Version 0.0.4
Last update 28. December 2019
Organization not specified
URL Not specified
License not specified
Dependencies amount 2
Dependencies mockito-core, commons-lang3,
There are maybe transitive dependencies!

assignables-annotations from group net.lepshi.commons (version 0.0.4)

This software library enables construction of complex POJO structures (Builder pattern) in a concise, beautiful way. It also supports construction of complex Mockito mocks enhancing readability of your unit tests. This module provides annotations for auto-generation of assignables code.

Group: net.lepshi.commons Artifact: assignables-annotations
Show documentation Show source 
 

0 downloads
Artifact assignables-annotations
Group net.lepshi.commons
Version 0.0.4
Last update 28. December 2019
Organization not specified
URL Not specified
License not specified
Dependencies amount 3
Dependencies assignables-core, commons-lang3, javapoet,
There are maybe transitive dependencies!

capture-replay-framework from group de.codecentric (version 1.1.0)

This framework takes test data generation to the next level by capturing real data. Instead of injecting mocks that load manually written fixtures, the Capture & Replay Framework transparently augments existing classes with proxies that replay previously captured data.

Group: de.codecentric Artifact: capture-replay-framework
Show all versions Show documentation Show source 
 

0 downloads
Artifact capture-replay-framework
Group de.codecentric
Version 1.1.0
Last update 23. May 2014
Organization codecentric AG
URL https://github.com/codecentric/capture-replay-framework
License Apache License, Version 2.0
Dependencies amount 8
Dependencies spring-beans, spring-context, spring-aop, aspectjrt, aspectjweaver, commons-lang3, jackson-databind, junit,
There are maybe transitive dependencies!

ipsedixit from group net.sf.ipsedixit (version 1.0.2)

Ipsedixit is a lightweight provider of arbitrary data, mocks and dummies for your Java testing pleasure. It is designed to reduce the amount of boilerplate setup code in your tests, allowing you to spend more time solving more interesting problems. Check out the wiki for the latest docco and examples.

Group: net.sf.ipsedixit Artifact: ipsedixit
Show all versions Show documentation Show source 
 

0 downloads
Artifact ipsedixit
Group net.sf.ipsedixit
Version 1.0.2
Last update 19. May 2012
Organization not specified
URL http://ipsedixit.sourceforge.net
License Apache 2
Dependencies amount 3
Dependencies objenesis, commons-lang, cglib,
There are maybe transitive dependencies!

jmockring-core from group org.jmockring (version 0.7.0)

jmockring - Java test MOCKing tool for spRING. A test harness tool for projects using the following technology stack: - Java 6+ - Spring 3.1 or greater as a DI/Deployment container - JUnit 4 and Mockito for testing - Jetty/Servlet API 3.0 for web app (war) deployment - for testing only Main features: 1) Partial Spring context deployment with automatic bean mocking for unavailable beans 2) Bootstrapping embedded Jetty server via JUnit runners 3) Configurable web application contexts 4) Automatic injection of Spring beans and mocks in JUnit tests via Java5 annotations

Group: org.jmockring Artifact: jmockring-core
Show all versions Show documentation Show source 
 

0 downloads
Artifact jmockring-core
Group org.jmockring
Version 0.7.0
Last update 13. March 2017
Organization not specified
URL https://github.com/plechev/jmockring
License not specified
Dependencies amount 15
Dependencies javax.servlet-api, commons-collections, javax.inject, hibernate-jpa-2.0-api, spring-core, spring-beans, spring-expression, spring-context, spring-context-support, spring-web, spring-tx, commons-lang3, junit-dep, mockito-core, hamcrest-junit,
There are maybe transitive dependencies!

pact-jvm-provider-spring_2.12 from group au.com.dius (version 3.6.15)

# Pact Spring/JUnit runner ## Overview Library provides ability to play contract tests against a provider using Spring & JUnit. This library is based on and references the JUnit package, so see the [Pact JUnit 4](../pact-jvm-provider-junit) or [Pact JUnit 5](../pact-jvm-provider-junit5) providers for more details regarding configuration using JUnit. Supports: - Standard ways to load pacts from folders and broker - Easy way to change assertion strategy - Spring Test MockMVC Controllers and ControllerAdvice using MockMvc standalone setup. - MockMvc debugger output - Multiple @State runs to test a particular Provider State multiple times - **au.com.dius.pact.provider.junit.State** custom annotation - before each interaction that requires a state change, all methods annotated by `@State` with appropriate the state listed will be invoked. **NOTE:** For publishing provider verification results to a pact broker, make sure the Java system property `pact.provider.version` is set with the version of your provider. ## Example of MockMvc test ```java @RunWith(RestPactRunner.class) // Custom pact runner, child of PactRunner which runs only REST tests @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 { //Create an instance of your controller. We cannot autowire this as we're not using (and don't want to use) a Spring test runner. @InjectMocks private AwesomeController awesomeController = new AwesomeController(); //Mock your service logic class. We'll use this to create scenarios for respective provider states. @Mock private AwesomeBusinessLogic awesomeBusinessLogic; //Create an instance of your controller advice (if you have one). This will be passed to the MockMvcTarget constructor to be wired up with MockMvc. @InjectMocks private AwesomeControllerAdvice awesomeControllerAdvice = new AwesomeControllerAdvice(); //Create a new instance of the MockMvcTarget and annotate it as the TestTarget for PactRunner @TestTarget public final MockMvcTarget target = new MockMvcTarget(); @Before //Method will be run before each test of interaction public void before() { //initialize your mocks using your mocking framework MockitoAnnotations.initMocks(this); //configure the MockMvcTarget with your controller and controller advice target.setControllers(awesomeController); target.setControllerAdvice(awesomeControllerAdvice); } @State("default", "no-data") // Method will be run before testing interactions that require "default" or "no-data" state public void toDefaultState() { target.setRunTimes(3); //let's loop through this state a few times for a 3 data variants when(awesomeBusinessLogic.getById(any(UUID.class))) .thenReturn(myTestHelper.generateRandomReturnData(UUID.randomUUID(), ExampleEnum.ONE)) .thenReturn(myTestHelper.generateRandomReturnData(UUID.randomUUID(), ExampleEnum.TWO)) .thenReturn(myTestHelper.generateRandomReturnData(UUID.randomUUID(), ExampleEnum.THREE)); } @State("error-case") public void SingleUploadExistsState_Success() { target.setRunTimes(1); //tell the runner to only loop one time for this state //you might want to throw exceptions to be picked off by your controller advice when(awesomeBusinessLogic.getById(any(UUID.class))) .then(i -> { throw new NotCoolException(i.getArgumentAt(0, UUID.class).toString()); }); } } ``` ## Using a Spring runner (version 3.5.7+) You can use `SpringRestPactRunner` instead of the default Pact runner to use the Spring test annotations. This will allow you to inject or mock spring beans. For example: ```java @RunWith(SpringRestPactRunner.class) @Provider("pricing") @PactBroker(protocol = "https", host = "${pactBrokerHost}", port = "443", authentication = @PactBrokerAuth(username = "${pactBrokerUser}", password = "${pactBrokerPassword}")) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) public class PricingServiceProviderPactTest { @MockBean private ProductClient productClient; // This will replace the bean with a mock in the application context @TestTarget @SuppressWarnings(value = "VisibilityModifier") public final Target target = new HttpTarget(8091); @State("Product X010000021 exists") public void setupProductX010000021() throws IOException { reset(productClient); ProductBuilder product = new ProductBuilder() .withProductCode("X010000021"); when(productClient.fetch((Set<String>) argThat(contains("X010000021")), any())).thenReturn(product); } @State("the product code X00001 can be priced") public void theProductCodeX00001CanBePriced() throws IOException { reset(productClient); ProductBuilder product = new ProductBuilder() .withProductCode("X00001"); when(productClient.find((Set<String>) argThat(contains("X00001")), any())).thenReturn(product); } } ``` ### Using Spring Context Properties (version 3.5.14+) From version 3.5.14 onwards, the SpringRestPactRunner will look up any annotation expressions (like `${pactBrokerHost}`) above) from the Spring context. For Springboot, this will allow you to define the properties in the application test properties. For instance, if you create the following `application.yml` in the test resources: ```yaml pactbroker: host: "your.broker.local" port: "443" protocol: "https" auth: username: "<your broker username>" password: "<your broker password>" ``` Then you can use the defaults on the `@PactBroker` annotation. ```java @RunWith(SpringRestPactRunner.class) @Provider("My Service") @PactBroker( authentication = @PactBrokerAuth(username = "${pactbroker.auth.username}", password = "${pactbroker.auth.password}") ) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class PactVerificationTest { ``` ### Using a random port with a Springboot test (version 3.5.14+) If you use a random port in a springboot test (by setting `SpringBootTest.WebEnvironment.RANDOM_PORT`), you can use the `SpringBootHttpTarget` which will get the application port from the spring application context. For example: ```java @RunWith(SpringRestPactRunner.class) @Provider("My Service") @PactBroker @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class PactVerificationTest { @TestTarget public final Target target = new SpringBootHttpTarget(); } ```

Group: au.com.dius Artifact: pact-jvm-provider-spring_2.12
Show all versions Show documentation Show source 
 

1 downloads
Artifact pact-jvm-provider-spring_2.12
Group au.com.dius
Version 3.6.15
Last update 29. April 2020
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 5
Dependencies pact-jvm-provider-junit_2.12, spring-boot-starter-test, spring-webmvc, javax.servlet-api, jackson-datatype-joda,
There are maybe transitive dependencies!

pact-jvm-provider-spring_2.11 from group au.com.dius (version 3.5.24)

# Pact Spring/JUnit runner ## Overview Library provides ability to play contract tests against a provider using Spring & JUnit. This library is based on and references the JUnit package, so see [junit provider support](pact-jvm-provider-junit) for more details regarding configuration using JUnit. Supports: - Standard ways to load pacts from folders and broker - Easy way to change assertion strategy - Spring Test MockMVC Controllers and ControllerAdvice using MockMvc standalone setup. - MockMvc debugger output - Multiple @State runs to test a particular Provider State multiple times - **au.com.dius.pact.provider.junit.State** custom annotation - before each interaction that requires a state change, all methods annotated by `@State` with appropriate the state listed will be invoked. **NOTE:** For publishing provider verification results to a pact broker, make sure the Java system property `pact.provider.version` is set with the version of your provider. ## Example of MockMvc test ```java @RunWith(RestPactRunner.class) // Custom pact runner, child of PactRunner which runs only REST tests @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 { //Create an instance of your controller. We cannot autowire this as we're not using (and don't want to use) a Spring test runner. @InjectMocks private AwesomeController awesomeController = new AwesomeController(); //Mock your service logic class. We'll use this to create scenarios for respective provider states. @Mock private AwesomeBusinessLogic awesomeBusinessLogic; //Create an instance of your controller advice (if you have one). This will be passed to the MockMvcTarget constructor to be wired up with MockMvc. @InjectMocks private AwesomeControllerAdvice awesomeControllerAdvice = new AwesomeControllerAdvice(); //Create a new instance of the MockMvcTarget and annotate it as the TestTarget for PactRunner @TestTarget public final MockMvcTarget target = new MockMvcTarget(); @Before //Method will be run before each test of interaction public void before() { //initialize your mocks using your mocking framework MockitoAnnotations.initMocks(this); //configure the MockMvcTarget with your controller and controller advice target.setControllers(awesomeController); target.setControllerAdvice(awesomeControllerAdvice); } @State("default", "no-data") // Method will be run before testing interactions that require "default" or "no-data" state public void toDefaultState() { target.setRunTimes(3); //let's loop through this state a few times for a 3 data variants when(awesomeBusinessLogic.getById(any(UUID.class))) .thenReturn(myTestHelper.generateRandomReturnData(UUID.randomUUID(), ExampleEnum.ONE)) .thenReturn(myTestHelper.generateRandomReturnData(UUID.randomUUID(), ExampleEnum.TWO)) .thenReturn(myTestHelper.generateRandomReturnData(UUID.randomUUID(), ExampleEnum.THREE)); } @State("error-case") public void SingleUploadExistsState_Success() { target.setRunTimes(1); //tell the runner to only loop one time for this state //you might want to throw exceptions to be picked off by your controller advice when(awesomeBusinessLogic.getById(any(UUID.class))) .then(i -> { throw new NotCoolException(i.getArgumentAt(0, UUID.class).toString()); }); } } ``` ## Using a Spring runner (version 3.5.7+) You can use `SpringRestPactRunner` instead of the default Pact runner to use the Spring test annotations. This will allow you to inject or mock spring beans. For example: ```java @RunWith(SpringRestPactRunner.class) @Provider("pricing") @PactBroker(protocol = "https", host = "${pactBrokerHost}", port = "443", authentication = @PactBrokerAuth(username = "${pactBrokerUser}", password = "${pactBrokerPassword}")) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) public class PricingServiceProviderPactTest { @MockBean private ProductClient productClient; // This will replace the bean with a mock in the application context @TestTarget @SuppressWarnings(value = "VisibilityModifier") public final Target target = new HttpTarget(8091); @State("Product X010000021 exists") public void setupProductX010000021() throws IOException { reset(productClient); ProductBuilder product = new ProductBuilder() .withProductCode("X010000021"); when(productClient.fetch((Set<String>) argThat(contains("X010000021")), any())).thenReturn(product); } @State("the product code X00001 can be priced") public void theProductCodeX00001CanBePriced() throws IOException { reset(productClient); ProductBuilder product = new ProductBuilder() .withProductCode("X00001"); when(productClient.find((Set<String>) argThat(contains("X00001")), any())).thenReturn(product); } } ``` ### Using Spring Context Properties (version 3.5.14+) From version 3.5.14 onwards, the SpringRestPactRunner will look up any annotation expressions (like `${pactBrokerHost}`) above) from the Spring context. For Springboot, this will allow you to define the properties in the application test properties. For instance, if you create the following `application.yml` in the test resources: ```yaml pactbroker: host: "your.broker.local" port: "443" protocol: "https" auth: username: "<your broker username>" password: "<your broker password>" ``` Then you can use the defaults on the `@PactBroker` annotation. ```java @RunWith(SpringRestPactRunner.class) @Provider("My Service") @PactBroker( authentication = @PactBrokerAuth(username = "${pactbroker.auth.username}", password = "${pactbroker.auth.password}") ) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class PactVerificationTest { ``` ### Using a random port with a Springboot test (version 3.5.14+) If you use a random port in a springboot test (by setting `SpringBootTest.WebEnvironment.RANDOM_PORT`), you can use the `SpringBootHttpTarget` which will get the application port from the spring application context. For example: ```java @RunWith(SpringRestPactRunner.class) @Provider("My Service") @PactBroker @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) public class PactVerificationTest { @TestTarget public final Target target = new SpringBootHttpTarget(); } ```

Group: au.com.dius Artifact: pact-jvm-provider-spring_2.11
Show all versions Show documentation Show source 
 

2 downloads
Artifact pact-jvm-provider-spring_2.11
Group au.com.dius
Version 3.5.24
Last update 04. November 2018
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 13
Dependencies kotlin-stdlib-jdk8, kotlin-reflect, slf4j-api, groovy-all, kotlin-logging, scala-library, scala-logging_2.11, pact-jvm-provider-junit_2.11, spring-boot-starter-test, spring-web, spring-webmvc, javax.servlet-api, jackson-datatype-joda,
There are maybe transitive dependencies!



Page 11 from 3 (items total 111)


© 2015 - 2024 Weber Informatics LLC | Privacy Policy