Download JAR files tagged by same with all dependencies
spring-ldap from group org.springframework.ldap (version 1.3.1.RELEASE)
Spring LDAP is a Java library for simplifying LDAP
operations, based on the pattern of Spring's JdbcTemplate. The
framework relieves the user of common chores, such as looking up and
closing contexts, looping through results, encoding/decoding values
and filters, and more. The LdapTemplate class encapsulates all the
plumbing work involved in traditional LDAP programming, such as
creating a DirContext, looping through NamingEnumerations, handling
exceptions and cleaning up resources. This leaves the programmer to
handle the important stuff - where to find data (DNs and Filters) and
what do do with it (map to and from domain objects, bind, modify,
unbind, etc.), in the same way that JdbcTemplate relieves the
programmer of all but the actual SQL and how the data maps to the
domain model. In addition to this, Spring LDAP provides transaction
support, a pooling library, exception translation from
NamingExceptions to a mirrored unchecked Exception hierarchy, as well
as several utilities for working with filters, LDAP paths and
Attributes.
Group: org.springframework.ldap Artifact: spring-ldap
Show all versions
Show all versions
There is no JAR file uploaded. A download is not possible! Please choose another version.
6 downloads
Artifact spring-ldap
Group org.springframework.ldap
Version 1.3.1.RELEASE
Last update 01. December 2010
Organization The Spring LDAP Framework
URL http://springframework.org/ldap
License The Apache Software License, Version 2.0
Dependencies amount 1
Dependencies spring-core,
There are maybe transitive dependencies!
Group org.springframework.ldap
Version 1.3.1.RELEASE
Last update 01. December 2010
Organization The Spring LDAP Framework
URL http://springframework.org/ldap
License The Apache Software License, Version 2.0
Dependencies amount 1
Dependencies spring-core,
There are maybe transitive dependencies!
prolobjectlink-jpi from group io.github.prolobjectlink (version 1.1)
Java Prolog Interface (JPI) is an Application Provider Interface (API) for interaction between Java and Prolog programming languages. Is a bidirectional interface that communicate Java applications with Prolog program or database and Prolog procedures with Java class and methods.
JPI is an abstraction layer over concrete prolog drivers over Prolog Engines. This API define all mechanism to interact with any Prolog Engine and maintain the application independent to a specific underlying engine. JPI have several connectors to open source prolog engines like SWI, YAP, XSB native engines and tuProlog, jTrolog, jLog Java based prolog engines.
JPI study all related Java-Prolog integration libraries and take the betters features from each solution with the propose to achieve a common integration interface. The last feature allows switch the under laying Prolog Engine driver and the application code still be the same.
JPI run over any Java Virtual Machine that support Java SE 5 or above. The project was tested over HotSpot, Open J9 and JRockit Virtual Machines over Operating Systems like Windows (7,8,10), Linux (Debian, Ubuntu) and Mac OS X. Can be deployed on Servlets Containers like Jetty, Tomcat or Glassfish Application Server.
JPI can be include in any Java Project using the commonest Java Integration Development Enviroment (IDE) like Eclipse, Netbeans, IntelijIDEA and so on.
JPI is developed and maintained by Prolobjectlink Project an open source initiative for build logic based applications using Prolog like fundamental Logic Programming Language in the persistence layer and application programming.
Group: io.github.prolobjectlink Artifact: prolobjectlink-jpi
Show all versions Show documentation Show source
Show all versions Show documentation Show source
0 downloads
Artifact prolobjectlink-jpi
Group io.github.prolobjectlink
Version 1.1
Last update 02. June 2022
Organization Prolobjectlink Project
URL https://prolobjectlink.github.io/${project.name}
License MIT
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!
Group io.github.prolobjectlink
Version 1.1
Last update 02. June 2022
Organization Prolobjectlink Project
URL https://prolobjectlink.github.io/${project.name}
License MIT
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!
netbeans-color-codes-preview from group com.junichi11.netbeans.modules (version 0.13.4)
Show color codes preview per line in a sidebar area of an editor.
<h2>Disable / Enable</h2>
Check/Uncheck View > Show Colors
<h2>Supported color patterns</h2>
<ul>
<li>Hex color code (e.g. #ffffff, #000)</li>
<li>Css rgb/rgba values (e.g. rgb(0,0,0), rgba(255, 255, 255, 0.8))</li>
<li>Css hsl/hsla values (e.g. hsl(0, 100%, 50%), hsla(120, 100%, 50%, 0.5))</li>
<li>Named colors (e.g. red, blue)</li>
<li>Java Color class (e.g. Color.black, new Color(100, 100, 100))</li>
</ul>
<h2>Multiple colors</h2>
<ul>
<li>Show top two colors in a sidebar if there are multiple colors in a line.</li>
<li>If you want to check all colors, please click a specific rectangle. They will be shown as a list.</li>
</ul>
<h2>Change a color using the color chooser</h2>
<ul>
<li>Click a colored rectangle</li>
<li>Click a color value of a list</li>
<li>Select a new color in the color chooser</li>
<li>An old color value will be changed to new one with the same format</li>
</ul>
<h2>Generate color codes</h2><p>You can generate color codes via a code generator(<kbd>Alt</kbd> + <kbd>Ins</kbd>).</p>
<ol>
<li>Run a code generator(Alt + Ins)</li>
<li>Choose <code>Color...</code></li>
<li>Choose format you expect (e.g. <code>new Color(r, g, b)</code>)</li>
<li>Choose a color</li>
<li>Click the OK button</li>
<li>A color code is generated at the caret position</li>
</ol>
<h2>Options</h2>
Tools > Options > Miscellaneous > Color Codes Preview
<h3>Regex for enabled mime-types for Hex and CSS colors</h3>
Default value is `^text/(x-)?(css|less|sass|scss)$`.
If you would like to disable/enable some mime-types, please change the default regex.
This pattern is used when the plugin checks a mime-type.
<h3>Named Colors</h3>
This option is `false` by default. If you would like to show named colors, please check it.
<h2>NOTE</h2>
<ul>
<li>If you would like to show colors of `Color.decode(<hex>)` e.g. `Color.decode(#000000)`, Please add `java` to "Regex for enabled mime-types" of Hex and CSS e.g. (`^text/(x-)?(css|less|sass|scss|java)$`)</li>
<li>Colors may be shown if they are not color codes. e.g. "#feature" contains #fea. This plugin recognizes it as a hex color code.</li>
<li>If you use the GTK Look and Feel, you cannot change an alpha value in the color chooser.</li>
<li>Hsl or hsla color values may not be changed correctly when you use the color chooser. (There may be 1% errors.)</li>
</ul>
0 downloads
Artifact netbeans-color-codes-preview
Group com.junichi11.netbeans.modules
Version 0.13.4
Last update 10. October 2021
Organization not specified
URL https://github.com/junichi11/netbeans-color-codes-preview
License Apache License, Version 2.0
Dependencies amount 16
Dependencies org-netbeans-api-annotations-common, org-netbeans-modules-editor-lib2, org-netbeans-modules-editor-lib, org-openide-util, org-openide-util-ui, org-netbeans-modules-editor-mimelookup, org-openide-util-lookup, org-netbeans-modules-editor-settings, org-netbeans-modules-editor, org-openide-dialogs, org-netbeans-modules-editor-fold, org-openide-text, org-netbeans-modules-options-api, org-openide-awt, org-netbeans-modules-editor-document, org-openide-modules,
There are maybe transitive dependencies!
Group com.junichi11.netbeans.modules
Version 0.13.4
Last update 10. October 2021
Organization not specified
URL https://github.com/junichi11/netbeans-color-codes-preview
License Apache License, Version 2.0
Dependencies amount 16
Dependencies org-netbeans-api-annotations-common, org-netbeans-modules-editor-lib2, org-netbeans-modules-editor-lib, org-openide-util, org-openide-util-ui, org-netbeans-modules-editor-mimelookup, org-openide-util-lookup, org-netbeans-modules-editor-settings, org-netbeans-modules-editor, org-openide-dialogs, org-netbeans-modules-editor-fold, org-openide-text, org-netbeans-modules-options-api, org-openide-awt, org-netbeans-modules-editor-document, org-openide-modules,
There are maybe transitive dependencies!
rouplex-niossl-parent from group org.rouplex (version 1.0.3)
Rouplex-Niossl is a java SPI (service provider interface) for secure (SSL/TLS), selectable, socket channels.
Some of the classes in the java.nio.channels package have been extended by secure counterparts that can be used
side by side, or replace existing instances of the plain implementations. This package contains just the entry
point calls for instantiating such instances, as well as a non-functional, default implementation. For a
concrete implementation of these classes you can take a look at Rouplex-Niossl-Spi, which would be included as
a separate dependency to your applications.
More specifically this library defines SSLSocketChannel class to inherit from SocketChannel,
SSLServerSocketChannel to inherit from ServerSocketChannel and SSLSelector to inherit from SSLSelector. One or
more instances of SSLSocketChannel can be registered with an (or more) instance of SSLSelector to be selected
upon, with the same exact semantics a SocketChannel would expect from registering with a Selector. Further, a
mixture of SocketChannels and SSLSocketChannels can be registered simultaneously with an SSLSelector. The
secure counterparts abide to the same API and semantics defined for plain channels at
https://docs.oracle.com/javase/8/docs/api/java/nio/channels/package-summary.html. This way, the existing
products can be easily updated to provide secure communication and new products can achieve security of data in
transit by using the already proven and excellent patterns for communication such as nio.
Group: org.rouplex Artifact: rouplex-niossl-parent
Show all versions
Show all versions
There is no JAR file uploaded. A download is not possible! Please choose another version.
0 downloads
Artifact rouplex-niossl-parent
Group org.rouplex
Version 1.0.3
Last update 23. September 2017
Organization not specified
URL https://github.com/rouplex/rouplex-niossl
License FreeBSD
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!
Group org.rouplex
Version 1.0.3
Last update 23. September 2017
Organization not specified
URL https://github.com/rouplex/rouplex-niossl
License FreeBSD
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!
rouplex-niossl from group org.rouplex (version 1.9.3)
Rouplex-Niossl is a java SPI (service provider interface) for secure (SSL/TLS), selectable, socket channels.
Some of the classes in the java.nio.channels package have been extended by secure counterparts that can be used
side by side, or replace existing instances of the plain implementations. This package contains just the entry
point calls for instantiating such instances, as well as a non-functional, default implementation. For a
concrete implementation of these classes you can take a look at Rouplex-Niossl-Spi, which would be included as
a separate dependency to your applications.
More specifically this library defines SSLSocketChannel class to inherit from SocketChannel,
SSLServerSocketChannel to inherit from ServerSocketChannel and SSLSelector to inherit from SSLSelector. One or
more instances of SSLSocketChannel can be registered with an (or more) instance of SSLSelector to be selected
upon, with the same exact semantics a SocketChannel would expect from registering with a Selector. Further, a
mixture of SocketChannels and SSLSocketChannels can be registered simultaneously with an SSLSelector. The
secure counterparts abide to the same API and semantics defined for plain channels at
https://docs.oracle.com/javase/8/docs/api/java/nio/channels/package-summary.html. This way, the existing
products can be easily updated to provide secure communication and new products can achieve security of data in
transit by using the already proven and excellent patterns for communication such as nio.
1 downloads
Artifact rouplex-niossl
Group org.rouplex
Version 1.9.3
Last update 23. September 2017
Organization not specified
URL Not specified
License not specified
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!
Group org.rouplex
Version 1.9.3
Last update 23. September 2017
Organization not specified
URL Not specified
License not specified
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!
mydas from group uk.ac.ebi.mydas (version 1.0.2)
This project aims to offer an easy-to-extend Java DAS server framework.
It offers several advantages:
* Implementing data sources is very easy but also flexible and powerful.
* Data caching is built into the system, with access to the caching
mechanism made available to the data sources.
* All aspects of the server are highly configurable, including
selecting options where the DAS 1.53 specification offers
choices to the implementor.
* The latest Java technologies have been used throughout the
system to optimise performance and simplify data source development.
* Wherever possible the same terminology is used in the API as in
the DAS specification and XML - again, making data source
development more easy.
* The server allows XSLT transforms of the DAS XML to be configured
to provide a simple DAS client view (limited to the single DAS
source).
More details of the DAS protocol, DAS servers and DAS clients can
be found at http://www.biodas.org/wiki/Main_Page.
The first version of this server is a complete implementation of
Distributed Sequence Annotation System (DAS) Version 1.53.
If you are interested in learning more about DAS 1.53, the
specification is highly recommended as a concise and complete
description of the DAS protocol that can be obtained from:
http://biodas.org/documents/spec.html
Artifact mydas
Group uk.ac.ebi.mydas
Version 1.0.2
Last update 19. August 2007
Organization not specified
URL http://code.google.com/p/mydas/
License The Apache Software License 2.0
Dependencies amount 7
Dependencies commons-collections, servlet-api, log4j, xpp3, xercesImpl, oscache, commons-logging,
There are maybe transitive dependencies!
Group uk.ac.ebi.mydas
Version 1.0.2
Last update 19. August 2007
Organization not specified
URL http://code.google.com/p/mydas/
License The Apache Software License 2.0
Dependencies amount 7
Dependencies commons-collections, servlet-api, log4j, xpp3, xercesImpl, oscache, commons-logging,
There are maybe transitive dependencies!
chips-n-salsa from group org.cicirello (version 6.4.0)
Chips-n-Salsa is a Java library of customizable,
hybridizable, iterative, parallel, stochastic, and self-adaptive
local search algorithms. The library includes implementations of
several stochastic local search algorithms, including simulated
annealing, hill climbers, as well as constructive search algorithms
such as stochastic sampling. Chips-n-Salsa now also includes genetic
algorithms as well as evolutionary algorithms more generally. The
library very extensively supports simulated annealing. It includes
several classes for representing solutions to a variety of optimization
problems. For example, the library includes a BitVector class that
implements vectors of bits, as well as classes for representing
solutions to problems where we are searching for an optimal vector
of integers or reals. For each of the built-in representations, the
library provides the most common mutation operators for generating
random neighbors of candidate solutions, as well as common crossover
operators for use with evolutionary algorithms. Additionally, the
library provides extensive support for permutation optimization
problems, including implementations of many different mutation
operators for permutations, and utilizing the efficiently implemented
Permutation class of the JavaPermutationTools (JPT) library.
Chips-n-Salsa is customizable, making extensive use of Java's generic
types, enabling using the library to optimize other types of representations
beyond what is provided in the library. It is hybridizable, providing
support for integrating multiple forms of local search (e.g., using a hill
climber on a solution generated by simulated annealing), creating hybrid
mutation operators (e.g., local search using multiple mutation operators),
as well as support for running more than one type of search for the same
problem concurrently using multiple threads as a form of algorithm portfolio.
Chips-n-Salsa is iterative, with support for multistart metaheuristics,
including implementations of several restart schedules for varying the run
lengths across the restarts. It also supports parallel execution of multiple
instances of the same, or different, stochastic local search algorithms for
an instance of a problem to accelerate the search process. The library
supports self-adaptive search in a variety of ways, such as including
implementations of adaptive annealing schedules for simulated annealing,
such as the Modified Lam schedule, implementations of the simpler annealing
schedules but which self-tune the initial temperature and other parameters,
and restart schedules that adapt to run length.
0 downloads
Artifact chips-n-salsa
Group org.cicirello
Version 6.4.0
Last update 28. July 2023
Organization Cicirello.Org
URL https://chips-n-salsa.cicirello.org/
License GPL-3.0-or-later
Dependencies amount 3
Dependencies jpt, rho-mu, core,
There are maybe transitive dependencies!
Group org.cicirello
Version 6.4.0
Last update 28. July 2023
Organization Cicirello.Org
URL https://chips-n-salsa.cicirello.org/
License GPL-3.0-or-later
Dependencies amount 3
Dependencies jpt, rho-mu, core,
There are maybe transitive dependencies!
pact-jvm-provider-junit5_2.11 from group au.com.dius (version 3.5.24)
# Pact Junit 5 Extension
## Overview
For writing Pact verification tests with JUnit 5, there is an JUnit 5 Invocation Context Provider that you can use with
the `@TestTemplate` annotation. This will generate a test for each interaction found for the pact files for the provider.
To use it, add the `@Provider` and one of the pact source annotations to your test class (as per a JUnit 4 test), then
add a method annotated with `@TestTemplate` and `@ExtendWith(PactVerificationInvocationContextProvider.class)` that
takes a `PactVerificationContext` parameter. You will need to call `verifyInteraction()` on the context parameter in
your test template method.
For example:
```java
@Provider("myAwesomeService")
@PactFolder("pacts")
public class ContractVerificationTest {
@TestTemplate
@ExtendWith(PactVerificationInvocationContextProvider.class)
void pactVerificationTestTemplate(PactVerificationContext context) {
context.verifyInteraction();
}
}
```
For details on the provider and pact source annotations, refer to the [Pact junit runner](../pact-jvm-provider-junit/README.md) docs.
## Test target
You can set the test target (the object that defines the target of the test, which should point to your provider) on the
`PactVerificationContext`, but you need to do this in a before test method (annotated with `@BeforeEach`). There are three
different test targets you can use: `HttpTestTarget`, `HttpsTestTarget` and `AmpqTestTarget`.
For example:
```java
@BeforeEach
void before(PactVerificationContext context) {
context.setTarget(HttpTestTarget.fromUrl(new URL(myProviderUrl)));
// or something like
// context.setTarget(new HttpTestTarget("localhost", myProviderPort, "/"));
}
```
## Provider State Methods
Provider State Methods work in the same way as with JUnit 4 tests, refer to the [Pact junit runner](../pact-jvm-provider-junit/README.md) docs.
## Modifying the requests before they are sent
**Important Note:** You should only use this feature for things that can not be persisted in the pact file. By modifying the request, you are potentially modifying the contract from the consumer tests!
Sometimes you may need to add things to the requests that can't be persisted in a pact file. Examples of these would be authentication tokens, which have a small life span. The Http and Https test targets support injecting the request that will executed into the test template method.
You can then add things to the request before calling the `verifyInteraction()` method.
For example to add a header:
```java
@TestTemplate
@ExtendWith(PactVerificationInvocationContextProvider.class)
void testTemplate(PactVerificationContext context, HttpRequest request) {
// This will add a header to the request
request.addHeader("X-Auth-Token", "1234");
context.verifyInteraction();
}
```
## Objects that can be injected into the test methods
You can inject the following objects into your test methods (just like the `PactVerificationContext`). They will be null if injected before the
supported phase.
| Object | Can be injected from phase | Description |
| ------ | --------------- | ----------- |
| PactVerificationContext | @BeforeEach | The context to use to execute the interaction test |
| Pact | any | The Pact model for the test |
| Interaction | any | The Interaction model for the test |
| HttpRequest | @TestTemplate | The request that is going to be executed (only for HTTP and HTTPS targets) |
| ProviderVerifier | @TestTemplate | The verifier instance that is used to verify the interaction |
Group: au.com.dius Artifact: pact-jvm-provider-junit5_2.11
Show all versions Show documentation Show source
Show all versions Show documentation Show source
2 downloads
Artifact pact-jvm-provider-junit5_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 9
Dependencies kotlin-stdlib-jdk8, kotlin-reflect, slf4j-api, groovy-all, kotlin-logging, scala-library, scala-logging_2.11, pact-jvm-provider-junit_2.11, junit-jupiter-api,
There are maybe transitive dependencies!
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 9
Dependencies kotlin-stdlib-jdk8, kotlin-reflect, slf4j-api, groovy-all, kotlin-logging, scala-library, scala-logging_2.11, pact-jvm-provider-junit_2.11, junit-jupiter-api,
There are maybe transitive dependencies!
pact-jvm-consumer-junit5_2.11 from group au.com.dius (version 3.5.24)
pact-jvm-consumer-junit5
========================
JUnit 5 support for Pact consumer tests
## Dependency
The library is available on maven central using:
* group-id = `au.com.dius`
* artifact-id = `pact-jvm-consumer-junit5_2.12`
* version-id = `3.5.x`
## Usage
### 1. Add the Pact consumer test extension to the test class.
To write Pact consumer tests with JUnit 5, you need to add `@ExtendWith(PactConsumerTestExt)` to your test class. This
replaces the `PactRunner` used for JUnit 4 tests. The rest of the test follows a similar pattern as for JUnit 4 tests.
```java
@ExtendWith(PactConsumerTestExt.class)
class ExampleJavaConsumerPactTest {
```
### 2. create a method annotated with `@Pact` that returns the interactions for the test
For each test (as with JUnit 4), you need to define a method annotated with the `@Pact` annotation that returns the
interactions for the test.
```java
@Pact(provider="test_provider", consumer="test_consumer")
public RequestResponsePact createPact(PactDslWithProvider builder) {
return builder
.given("test state")
.uponReceiving("ExampleJavaConsumerPactTest test interaction")
.path("/")
.method("GET")
.willRespondWith()
.status(200)
.body("{\"responsetest\": true}")
.toPact();
}
```
### 3. Link the mock server with the interactions for the test with `@PactTestFor`
Then the final step is to use the `@PactTestFor` annotation to tell the Pact extension how to setup the Pact test. You
can either put this annotation on the test class, or on the test method. For examples see
[ArticlesTest](src/test/java/au/com/dius/pact/consumer/junit5/ArticlesTest.java) and
[MultiTest](src/test/groovy/au/com/dius/pact/consumer/junit5/MultiTest.groovy).
The `@PactTestFor` annotation allows you to control the mock server in the same way as the JUnit 4 `PactProviderRule`. It
allows you to set the hostname to bind to (default is `localhost`) and the port (default is to use a random port). You
can also set the Pact specification version to use (default is V3).
```java
@ExtendWith(PactConsumerTestExt.class)
@PactTestFor(providerName = "ArticlesProvider", port = "1234")
public class ExampleJavaConsumerPactTest {
```
**NOTE on the hostname**: The mock server runs in the same JVM as the test, so the only valid values for hostname are:
| hostname | result |
| -------- | ------ |
| `localhost` | binds to the address that localhost points to (normally the loopback adapter) |
| `127.0.0.1` or `::1` | binds to the loopback adapter |
| host name | binds to the default interface that the host machines DNS name resolves to |
| `0.0.0.0` or `::` | binds to the all interfaces on the host machine |
#### Matching the interactions by provider name
If you set the `providerName` on the `@PactTestFor` annotation, then the first method with a `@Pact` annotation with the
same provider name will be used. See [ArticlesTest](src/test/java/au/com/dius/pact/consumer/junit5/ArticlesTest.java) for
an example.
#### Matching the interactions by method name
If you set the `pactMethod` on the `@PactTestFor` annotation, then the method with the provided name will be used (it still
needs a `@Pact` annotation). See [MultiTest](src/test/groovy/au/com/dius/pact/consumer/junit5/MultiTest.groovy) for an example.
### Injecting the mock server into the test
You can get the mock server injected into the test method by adding a `MockServer` parameter to the test method.
```java
@Test
void test(MockServer mockServer) {
HttpResponse httpResponse = Request.Get(mockServer.getUrl() + "/articles.json").execute().returnResponse();
assertThat(httpResponse.getStatusLine().getStatusCode(), is(equalTo(200)));
}
```
This helps with getting the base URL of the mock server, especially when a random port is used.
## Unsupported
The current implementation does not support tests with multiple providers. This will be added in a later release.
Group: au.com.dius Artifact: pact-jvm-consumer-junit5_2.11
Show all versions Show documentation Show source
Show all versions Show documentation Show source
1 downloads
Artifact pact-jvm-consumer-junit5_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 9
Dependencies kotlin-stdlib-jdk8, kotlin-reflect, slf4j-api, groovy-all, kotlin-logging, scala-library, scala-logging_2.11, pact-jvm-consumer_2.11, junit-jupiter-api,
There are maybe transitive dependencies!
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 9
Dependencies kotlin-stdlib-jdk8, kotlin-reflect, slf4j-api, groovy-all, kotlin-logging, scala-library, scala-logging_2.11, pact-jvm-consumer_2.11, junit-jupiter-api,
There are maybe transitive dependencies!
pact-jvm-consumer-groovy-v3_2.10 from group au.com.dius (version 2.2.15)
pact-jvm-consumer-groovy-v3
===========================
Groovy DSL for Pact JVM implementing V3 specification changes.
##Dependency
The library is available on maven central using:
* group-id = `au.com.dius`
* artifact-id = `pact-jvm-consumer-groovy-v3_2.11`
* version-id = `2.2.x` or `3.0.x`
##Usage
Add the `pact-jvm-consumer-groovy-v3` library to your test class path. This provides a `PactMessageBuilder` class for you to use
to define your pacts.
If you are using gradle for your build, add it to your `build.gradle`:
dependencies {
testCompile 'au.com.dius:pact-jvm-consumer-groovy-v3_2.11:2.2.12'
}
## Consumer test for a message consumer
The `PactMessageBuilder` class provides a DSL for defining your message expectations. It works in much the same way as
the `PactBuilder` class for Request-Response interactions.
### Step 1 - define the message expectations
Create a test that uses the `PactMessageBuilder` to define a message expectation, and then call `run`. This will invoke
the given closure with a message for each one defined in the pact.
```groovy
def eventStream = new PactMessageBuilder().call {
serviceConsumer 'messageConsumer'
hasPactWith 'messageProducer'
given 'order with id 10000004 exists'
expectsToReceive 'an order confirmation message'
withMetaData(type: 'OrderConfirmed') // Can define any key-value pairs here
withContent(contentType: 'application/json') {
type 'OrderConfirmed'
audit {
userCode 'messageService'
}
origin 'message-service'
referenceId '10000004-2'
timeSent: '2015-07-22T10:14:28+00:00'
value {
orderId '10000004'
value '10.000000'
fee '10.00'
gst '15.00'
}
}
}
```
### Step 2 - call your message handler with the generated messages
This example tests a message handler that gets messages from a Kafka topic. In this case the Pact message is wrapped
as a Kafka `MessageAndMetadata`.
```groovy
eventStream.run { Message message ->
messageHandler.handleMessage(new MessageAndMetadata('topic', 1,
new kafka.message.Message(message.contentsAsBytes()), 0, null, valueDecoder))
}
```
### Step 3 - validate that the message was handled correctly
```groovy
def order = orderRepository.getOrder('10000004')
assert order.status == 'confirmed'
assert order.value == 10.0
```
### Step 4 - Publish the pact file
If the test was successful, a pact file would have been produced with the message from step 1.
Group: au.com.dius Artifact: pact-jvm-consumer-groovy-v3_2.10
Show all versions Show documentation Show source
Show all versions Show documentation Show source
0 downloads
Artifact pact-jvm-consumer-groovy-v3_2.10
Group au.com.dius
Version 2.2.15
Last update 17. September 2015
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 7
Dependencies pact-jvm-consumer-groovy_2.10, scala-library, groovy-all, json4s-native_2.10, pact-jvm-model-v3_2.10, slf4j-api, json4s-jackson_2.10,
There are maybe transitive dependencies!
Group au.com.dius
Version 2.2.15
Last update 17. September 2015
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 7
Dependencies pact-jvm-consumer-groovy_2.10, scala-library, groovy-all, json4s-native_2.10, pact-jvm-model-v3_2.10, slf4j-api, json4s-jackson_2.10,
There are maybe transitive dependencies!
Page 51 from 53 (items total 527)