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

Download JAR files tagged by does with all dependencies

Search JAR files by class name

oneClassClassifier from group nz.ac.waikato.cms.weka (version 1.0.4)

Performs one-class classification on a dataset. Classifier reduces the class being classified to just a single class, and learns the datawithout using any information from other classes. The testing stage will classify as 'target'or 'outlier' - so in order to calculate the outlier pass rate the dataset must contain informationfrom more than one class. Also, the output varies depending on whether the label 'outlier' exists in the instances usedto build the classifier. If so, then 'outlier' will be predicted, if not, then the label willbe considered missing when the prediction does not favour the target class. The 'outlier' classwill not be used to build the model if there are instances of this class in the dataset. It cansimply be used as a flag, you do not need to relabel any classes. For more information, see: Kathryn Hempstalk, Eibe Frank, Ian H. Witten: One-Class Classification by Combining Density and Class Probability Estimation. In: Proceedings of the 12th European Conference on Principles and Practice of Knowledge Discovery in Databases and 19th European Conference on Machine Learning, ECMLPKDD2008, Berlin, 505--519, 2008.

Group: nz.ac.waikato.cms.weka Artifact: oneClassClassifier
Show all versions Show documentation Show source 
 

3 downloads
Artifact oneClassClassifier
Group nz.ac.waikato.cms.weka
Version 1.0.4
Last update 14. May 2013
Organization University of Waikato, Hamilton, NZ
URL http://weka.sourceforge.net/doc.packages/oneClassClassifier
License GNU General Public License 3
Dependencies amount 1
Dependencies weka-dev,
There are maybe transitive dependencies!

ibis-xerces from group org.ibissource (version 2.12.2-xml-schema-1.1)

Xerces2 is the next generation of high performance, fully compliant XML parsers in the Apache Xerces family. This new version of Xerces introduces the Xerces Native Interface (XNI), a complete framework for building parser components and configurations that is extremely modular and easy to program. The Apache Xerces2 parser is the reference implementation of XNI but other parser components, configurations, and parsers can be written using the Xerces Native Interface. For complete design and implementation documents, refer to the XNI Manual. Xerces2 is a fully conforming XML Schema 1.0 processor. A partial experimental implementation of the XML Schema 1.1 Structures and Datatypes Working Drafts (December 2009) and an experimental implementation of the XML Schema Definition Language (XSD): Component Designators (SCD) Candidate Recommendation (January 2010) are provided for evaluation. For more information, refer to the XML Schema page. Xerces2 also provides a complete implementation of the Document Object Model Level 3 Core and Load/Save W3C Recommendations and provides a complete implementation of the XML Inclusions (XInclude) W3C Recommendation. It also provides support for OASIS XML Catalogs v1.1. Xerces2 is able to parse documents written according to the XML 1.1 Recommendation, except that it does not yet provide an option to enable normalization checking as described in section 2.13 of this specification. It also handles namespaces according to the XML Namespaces 1.1 Recommendation, and will correctly serialize XML 1.1 documents if the DOM level 3 load/save APIs are in use.

Group: org.ibissource Artifact: ibis-xerces
Show all versions Show documentation Show source 
 

4 downloads
Artifact ibis-xerces
Group org.ibissource
Version 2.12.2-xml-schema-1.1
Last update 10. June 2022
Organization Ibissource.org
URL https://ibissource.org/
License The Apache Software License, Version 2.0
Dependencies amount 1
Dependencies org.eclipse.wst.xml.xpath2.processor,
There are maybe transitive dependencies!

xercesImpl from group org.exist-db.thirdparty.xerces (version 2.12.2)

Xerces2 is the next generation of high performance, fully compliant XML parsers in the Apache Xerces family. This new version of Xerces introduces the Xerces Native Interface (XNI), a complete framework for building parser components and configurations that is extremely modular and easy to program. The Apache Xerces2 parser is the reference implementation of XNI but other parser components, configurations, and parsers can be written using the Xerces Native Interface. For complete design and implementation documents, refer to the XNI Manual. Xerces2 is a fully conforming XML Schema 1.0 processor. A partial experimental implementation of the XML Schema 1.1 Structures and Datatypes Working Drafts (December 2009) and an experimental implementation of the XML Schema Definition Language (XSD): Component Designators (SCD) Candidate Recommendation (January 2010) are provided for evaluation. For more information, refer to the XML Schema page. Xerces2 also provides a complete implementation of the Document Object Model Level 3 Core and Load/Save W3C Recommendations and provides a complete implementation of the XML Inclusions (XInclude) W3C Recommendation. It also provides support for OASIS XML Catalogs v1.1. Xerces2 is able to parse documents written according to the XML 1.1 Recommendation, except that it does not yet provide an option to enable normalization checking as described in section 2.13 of this specification. It also handles namespaces according to the XML Namespaces 1.1 Recommendation, and will correctly serialize XML 1.1 documents if the DOM level 3 load/save APIs are in use.

Group: org.exist-db.thirdparty.xerces Artifact: xercesImpl
Show all versions Show documentation Show source 
 

8 downloads
Artifact xercesImpl
Group org.exist-db.thirdparty.xerces
Version 2.12.2
Last update 31. March 2022
Organization not specified
URL https://xerces.apache.org/xerces2-j/
License The Apache Software License, Version 2.0
Dependencies amount 1
Dependencies xml-apis,
There are maybe transitive dependencies!

xercesImpl from group xerces (version 2.12.2)

Xerces2 provides high performance, fully compliant XML parsers in the Apache Xerces family. This new version of Xerces continues to build upon the Xerces Native Interface (XNI), a complete framework for building parser components and configurations that is extremely modular and easy to program. The Apache Xerces2 parser is the reference implementation of XNI but other parser components, configurations, and parsers can be written using the Xerces Native Interface. For complete design and implementation documents, refer to the XNI Manual. Xerces2 provides fully conforming XML Schema 1.0 and 1.1 processors. An experimental implementation of the "XML Schema Definition Language (XSD): Component Designators (SCD) Candidate Recommendation (January 2010)" is also provided for evaluation. For more information, refer to the XML Schema page. Xerces2 also provides a complete implementation of the Document Object Model Level 3 Core and Load/Save W3C Recommendations and provides a complete implementation of the XML Inclusions (XInclude) W3C Recommendation. It also provides support for OASIS XML Catalogs v1.1. Xerces2 is able to parse documents written according to the XML 1.1 Recommendation, except that it does not yet provide an option to enable normalization checking as described in section 2.13 of this specification. It also handles namespaces according to the XML Namespaces 1.1 Recommendation, and will correctly serialize XML 1.1 documents if the DOM level 3 load/save APIs are in use.

Group: xerces Artifact: xercesImpl
Show all versions Show documentation Show source 
 

863 downloads
Artifact xercesImpl
Group xerces
Version 2.12.2
Last update 27. January 2022
Organization not specified
URL https://xerces.apache.org/xerces2-j/
License The Apache Software License, Version 2.0
Dependencies amount 1
Dependencies xml-apis,
There are maybe transitive dependencies!

xercesImpl from group org.codelibs.xerces (version 2.12.1-sp1)

Xerces2 is the next generation of high performance, fully compliant XML parsers in the Apache Xerces family. This new version of Xerces introduces the Xerces Native Interface (XNI), a complete framework for building parser components and configurations that is extremely modular and easy to program. The Apache Xerces2 parser is the reference implementation of XNI but other parser components, configurations, and parsers can be written using the Xerces Native Interface. For complete design and implementation documents, refer to the XNI Manual. Xerces2 is a fully conforming XML Schema 1.0 processor. A partial experimental implementation of the XML Schema 1.1 Structures and Datatypes Working Drafts (December 2009) and an experimental implementation of the XML Schema Definition Language (XSD): Component Designators (SCD) Candidate Recommendation (January 2010) are provided for evaluation. For more information, refer to the XML Schema page. Xerces2 also provides a complete implementation of the Document Object Model Level 3 Core and Load/Save W3C Recommendations and provides a complete implementation of the XML Inclusions (XInclude) W3C Recommendation. It also provides support for OASIS XML Catalogs v1.1. Xerces2 is able to parse documents written according to the XML 1.1 Recommendation, except that it does not yet provide an option to enable normalization checking as described in section 2.13 of this specification. It also handles namespaces according to the XML Namespaces 1.1 Recommendation, and will correctly serialize XML 1.1 documents if the DOM level 3 load/save APIs are in use.

Group: org.codelibs.xerces Artifact: xercesImpl
Show all versions Show documentation Show source 
 

0 downloads
Artifact xercesImpl
Group org.codelibs.xerces
Version 2.12.1-sp1
Last update 06. August 2020
Organization not specified
URL https://xerces.apache.org/xerces2-j/
License The Apache Software License, Version 2.0
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!

netbeans-textlint from group com.junichi11.netbeans.modules (version 1.1.0)

This plugin provides support for textlint. <h3>What&rsquo;s the textlint?</h3> <p>See <a href="https://github.com/textlint/textlint">https://github.com/textlint/textlint</a></p> <h3>Usage</h3> <h4>Install textlint and rules</h4> <p>Of course, it assumes that nodejs and npm are installed.</p> <p>e.g.</p> <pre><code>$ mkdir txtlint $ cd txtlint $ npm init $ npm install textlint --save-dev $ npm install textlint-rule-max-ten textlint-rule-spellcheck-tech-word textlint-rule-no-mix-dearu-desumasu --save-dev </code></pre> <h4>Create .textlintrc</h4> <pre><code>$ touch .textlintrc </code></pre> <pre><code class="json">{ &quot;rules&quot;: { &quot;max-ten&quot;: { &quot;max&quot;: 3 }, &quot;spellcheck-tech-word&quot;: true, &quot;no-mix-dearu-desumasu&quot;: true } } </code></pre> <p>You can also set parameters to Options (see below).</p> <h4>Set textlint and .textlintrc paths</h4> <p>Set paths to the Options (see below).</p> <p>e.g.</p> <ul> <li>textlint Path: /path/to/txtlint/node_modules/.bin/textlint (textlint.cmd in Windows)</li> <li>.textlintrc Path: /path/to/textlint/.textlintrc</li> </ul> <h4>Open Action Items window</h4> <ul> <li>Click Window > Action Items.</li> <li>Click &ldquo;Show action items for currently edited file only&rdquo; icon.</li> <li>Open your markdown or text file.</li> </ul> <h3>Options</h3> <p>Tools > Options > Editor > textlint</p> <ul> <li>textlint Path: Absolute path to textlint</li> <li>.textlintrc Path: Absolute path to .textlintrc</li> <li>Options : You can set options for the textlint command</li> <li>Enable in HTML files: To use the html plugin, you can check this</li> <li>Refresh on Save: To scan the document on save, you can check this (Checked by default)</li> <li>Show Annotations: To show annotations in the glyph gutter, you can check this (Checked by default)</li> </ul> <h3>Actions</h3> <h4>Fix</h4> <p>You have to save your file before you run this action.<br/> If there is a fixable rule&rsquo;s error, you can fix it. Right-click an item > Click <code>Fix</code>.<br/> To refresh items, your document is saved once.</p> <h4>Fix All</h4> <p>You have to save your file before you run this action.<br/> If there are fixable rule&rsquo;s errors, you can fix them. Right-click an item > Click <code>Fix All</code>.<br/> This action runs <code>textlint --fix</code> command.</p> <h4>Refresh</h4> <p>You can refresh results forcibly by the following action: Right-click your editor > Click "textlint Refresh".</p> <p>You can also set the shortcut key(Tools > Options > Keymap). </p> <h3>NOTE</h3> <ul> <li>The plugin scans only current file.</li> <li>The plugin does not refresh results automatically. Please save your file or run the refresh action.</li> <li>Use <code>UTF-8</code> as file encoding and <code>LF</code> as line endings.</li> <li>This plugin may not work properly in Windows. (Please try to check above.)</li> <li>If you cannot get expected results, just try to run the <code>textlint</code> commands once in your CLI.</li> </ul>

Group: com.junichi11.netbeans.modules Artifact: netbeans-textlint

 

0 downloads
Artifact netbeans-textlint
Group com.junichi11.netbeans.modules
Version 1.1.0
Last update 21. June 2020
Organization not specified
URL https://github.com/junichi11/netbeans-textlint-plugin
License Apache License, Version 2.0
Dependencies amount 23
Dependencies commons-lang3, gson, org-netbeans-api-annotations-common, org-netbeans-spi-tasklist, org-openide-filesystems, org-openide-util-lookup, org-netbeans-modules-extexecution, org-netbeans-modules-extexecution-base, org-openide-windows, org-openide-io, org-netbeans-modules-editor-lib2, org-openide-text, org-netbeans-modules-csl-api, org-netbeans-modules-editor-lib, org-openide-loaders, org-openide-dialogs, org-openide-util, org-openide-nodes, org-openide-util-ui, org-netbeans-modules-options-api, org-openide-awt, org-openide-filesystems-nb, org-netbeans-api-progress,
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=&quot;test_provider&quot;, consumer=&quot;test_consumer&quot;) public RequestResponsePact createPact(PactDslWithProvider builder) { return builder .given(&quot;test state&quot;) .uponReceiving(&quot;ExampleJavaConsumerPactTest test interaction&quot;) .path(&quot;/&quot;) .method(&quot;GET&quot;) .willRespondWith() .status(200) .body(&quot;{\&quot;responsetest\&quot;: true}&quot;) .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 = &quot;ArticlesProvider&quot;, port = &quot;1234&quot;) 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() + &quot;/articles.json&quot;).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 
 

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!

alphatier from group io.alphatier (version 0.3.0)

Alphatier is a resource management library. It is designed to allow different schedulers to share the resources of a pool of executors in order to execute tasks with those. Read the [detailed documentation](#io.alphatier.pools) below to get an in-depth understanding. ## License Copyright &copy; 2014 [Tobias Sarnowski](mailto:[email protected]), [Willi Schönborn](mailto:[email protected]) Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ## Usage The library is written in [Clojure](http://clojure.org/) and is available in the [central Maven repository](https://repo1.maven.org/maven2/io/alphatier/alphatier/): <dependency> <groupId>io.alphatier</groupId> <artifactId>alphatier</artifactId> <version>0.3.0</version> </dependency> The library is written in pure Clojure without [ahead-of-time compilation](http://clojure.org/compilation). This means, that the library does not contain any *.class files. If you work with Clojure, this is not a problem but if you like to use the library from another JVM language (like Java, Scala or Groovy), you can use [Clojure's built-in tools](http://clojure.org/java_interop#Java%20Interop-Calling%20Clojure%20From%20Java) for interoperability or try our Java library: [https://github.com/sarnowski/alphatier-java](https://github.com/sarnowski/alphatier-java) ### Development If you like to change this library, please have a look at the [README](README.md). Development is done via [Github](https://github.com/sarnowski/alphatier).

Group: io.alphatier Artifact: alphatier
Show all versions 
 

0 downloads
Artifact alphatier
Group io.alphatier
Version 0.3.0
Last update 16. October 2014
Organization not specified
URL http://alphatier.io
License ISC License
Dependencies amount 3
Dependencies clojure, core.incubator, core.typed,
There are maybe transitive dependencies!

beast-tool from group es.upm.dit.gsi (version 0.9.9)

BEhavioural Agents Simple Testing Tool - BEAST Tool The aim of this project is the development of a system which allows Behavior Driven Development (BDD) in Multi-Agent Systems (MAS), to make testing practices more accessible and intuitive to everybody. In one hand, in order to let tests be writable by newcomers and experts alike, system must allow the redaction of tests in plain text, because client does not need to have knowledge of our code. This plain text will be traduced to software later. The definition of test will be realized with the terminology Given-When-Then, which allows trace an easy guide of the behavior of a given scenario when something happened. In the other hand, due to the complexity of MAS, making unit testing of an agent that needs the interaction with others is almost impossible until the whole system is finished. This implies to leave testing issues to the end of the project, generating big troubles in case of malfunction. Consequently, its necessary to carry out a tool to allow the creation of mock agents and to perform tests during the whole development process. Therefore another objective of our systems is to include a mocking tool which permits testing continuously. Definitively, our tool allows the testing of any MAS in the development process, increasing its modularity and decreasing its elaboration and testing cost. These tests will be written in plain text so that anyone would be able to understand them. For further reading, a paper published in ITMAS2012 workshop can be found in: http://scholar.google.es/citations?view_op=view_citation&hl=es&user=mT3KgXUAAAAJ&citation_for_view=mT3KgXUAAAAJ:Tyk-4Ss8FVUC

Group: es.upm.dit.gsi Artifact: beast-tool
Show all versions Show documentation Show source 
 

0 downloads
Artifact beast-tool
Group es.upm.dit.gsi
Version 0.9.9
Last update 03. June 2014
Organization Grupo de Sistemas Inteligentes - Universidad Politécnica de Madrid
URL http://www.gsi.dit.upm.es/index.php/es/tecnologia/software/221-beast-tool.html
License GNU General Public License, version 2
Dependencies amount 27
Dependencies mockito-all, junit, maven-surefire-plugin, jbehave-web, jaxme2, jbehave-core, log4j, jadex-kernel-bdibpmn, jadex-kernel-micro, jadex-platform-standalone, jadex-runtimetools, jadex-applications-micro, jadex-bridge, jadex-kernel-base, jadex-kernel-extension-agr, jadex-tools-bdi, jadex-applib-bdi, jadex-kernel-application, jadex-applications-bdibpmn, jadex-applications-bpmn, jadex-applications-gpmn, jadex-kernel-gpmn, jadex-nuggets, jadex-rules-applications, jadex-tools-bpmn, jadex-tools-comanalyzer, jade,
There are maybe transitive dependencies!

pact-jvm-consumer-junit5_2.12 from group au.com.dius (version 3.6.15)

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.6.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=&quot;ArticlesProvider&quot;, consumer=&quot;test_consumer&quot;) public RequestResponsePact createPact(PactDslWithProvider builder) { return builder .given(&quot;test state&quot;) .uponReceiving(&quot;ExampleJavaConsumerPactTest test interaction&quot;) .path(&quot;/articles.json&quot;) .method(&quot;GET&quot;) .willRespondWith() .status(200) .body(&quot;{\&quot;responsetest\&quot;: true}&quot;) .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 = &quot;ArticlesProvider&quot;) 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) throws IOException { HttpResponse httpResponse = Request.Get(mockServer.getUrl() + &quot;/articles.json&quot;).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. ## Changing the directory pact files are written to By default, pact files are written to `target/pacts` (or `build/pacts` if you use Gradle), but this can be overwritten with the `pact.rootDir` system property. This property needs to be set on the test JVM as most build tools will fork a new JVM to run the tests. For Gradle, add this to your build.gradle: ```groovy test { systemProperties[&apos;pact.rootDir&apos;] = &quot;$buildDir/custom-pacts-directory&quot; } ``` For maven, use the systemPropertyVariables configuration: ```xml &lt;project&gt; [...] &lt;build&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt; &lt;version&gt;2.18&lt;/version&gt; &lt;configuration&gt; &lt;systemPropertyVariables&gt; &lt;pact.rootDir&gt;some/other/directory&lt;/pact.rootDir&gt; &lt;buildDirectory&gt;${project.build.directory}&lt;/buildDirectory&gt; [...] &lt;/systemPropertyVariables&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; [...] &lt;/project&gt; ``` For SBT: ```scala fork in Test := true, javaOptions in Test := Seq(&quot;-Dpact.rootDir=some/other/directory&quot;) ``` ### Using `@PactFolder` annotation [3.6.2+] You can override the directory the pacts are written in a test by adding the `@PactFolder` annotation to the test class. ## Forcing pact files to be overwritten (3.6.5+) By default, when the pact file is written, it will be merged with any existing pact file. To force the file to be overwritten, set the Java system property `pact.writer.overwrite` to `true`. ## Unsupported The current implementation does not support tests with multiple providers. This will be added in a later release. # Having values injected from provider state callbacks (3.6.11+) You can have values from the provider state callbacks be injected into most places (paths, query parameters, headers, bodies, etc.). This works by using the V3 spec generators with provider state callbacks that return values. One example of where this would be useful is API calls that require an ID which would be auto-generated by the database on the provider side, so there is no way to know what the ID would be beforehand. The following DSL methods all you to set an expression that will be parsed with the values returned from the provider states: For JSON bodies, use `valueFromProviderState`.&lt;br/&gt; For headers, use `headerFromProviderState`.&lt;br/&gt; For query parameters, use `queryParameterFromProviderState`.&lt;br/&gt; For paths, use `pathFromProviderState`. For example, assume that an API call is made to get the details of a user by ID. A provider state can be defined that specifies that the user must be exist, but the ID will be created when the user is created. So we can then define an expression for the path where the ID will be replaced with the value returned from the provider state callback. ```java .pathFromProviderState(&quot;/api/users/${id}&quot;, &quot;/api/users/100&quot;) ``` You can also just use the key instead of an expression: ```java .valueFromProviderState(&apos;userId&apos;, &apos;userId&apos;, 100) // will look value using userId as the key ```

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

3 downloads
Artifact pact-jvm-consumer-junit5_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 2
Dependencies pact-jvm-consumer_2.12, junit-jupiter-api,
There are maybe transitive dependencies!



Page 67 from 69 (items total 688)


© 2015 - 2024 Weber Informatics LLC | Privacy Policy