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

Download JAR files tagged by string with all dependencies

Search JAR files by class name

beige-settings from group org.beigesoft (version 1.1.3)

It helps to quickly make settings for class and its fields of with properties XML. Instead of create a lot of files to describe every class and its fields it use describing by type, by name. E.g. setting "java.lang.Integer"-"INTEGER NOT NULL" will be assigned fo every field of this type. Of course it can be overriden by settings for field name and so on. It is used by beige-web to describe how to render an entity and convert from HTML value. It is used by beige-orm to describe how to map an entity to a DBMS. It make simple settings - Map<String, String>, e.g. "title"-"Beige ORM 1.1", class settings Map<String, Map<String, String>>, e.g. "org.mode.Customer"-["defaultOrder"-"ITSNAME", "wdgFilterOrder"-"filterOrderStd"], fields settings Map<String, Map<String, Map<String, String>>>, e.g. "org.mode.Customer"-["itsId"["wdgNew"-"null", "wdgFilter"-"filterNumber"]]

Group: org.beigesoft Artifact: beige-settings
Show all versions Show documentation Show source 
 

0 downloads
Artifact beige-settings
Group org.beigesoft
Version 1.1.3
Last update 24. December 2016
Organization not specified
URL http://www.beigesoft.org
License The Apache Software License, Version 2.0
Dependencies amount 1
Dependencies beige-common,
There are maybe transitive dependencies!

netbeans-eid-generator from group pl.wavesoftware (version 0.4.0)

<p>Generates a unique Exception ID, that can be used in Java source code.</p> <p>In order to use this plugin type <code>Ctrl+Space</code> inside empty String literal. This will generate new unique identifier as a <i>Code Completion</i>. That generated EID can be used, for example, to identify your exceptions.</p> <p> Example usage (This is technical runtime exception, a posible bug. This plugin can be used to quickly fill unique bug id.):<br /> <code>try {<br /> &nbsp;&nbsp;&nbsp;&nbsp;shuldWorkIfNoBugsExists();<br /> } catch (IOException ex) {<br /> &nbsp;&nbsp;&nbsp;&nbsp;throw new EidRuntimeException("20140218:161429", "Something wrong with HDD, permissions?", ex);<br /> }</code> </p>

Group: pl.wavesoftware Artifact: netbeans-eid-generator
Show all versions Show documentation Show source 
 

0 downloads
Artifact netbeans-eid-generator
Group pl.wavesoftware
Version 0.4.0
Last update 01. December 2015
Organization Wave Software
URL https://github.com/wavesoftware/eid-generator
License The MIT License (MIT)
Dependencies amount 8
Dependencies org-netbeans-api-annotations-common, org-netbeans-modules-editor-completion, org-openide-util, org-openide-util-ui, org-openide-util-lookup, org-netbeans-modules-options-api, org-openide-awt, eid-exceptions,
There are maybe transitive dependencies!

xapi-template from group net.wetheinter (version 0.2)

A simple templating system for java codegen. This library includes an object-oriented, fluent source writing api, for a chained, intuitive codegen api. It also includes a template processor which can take java source files formatted with "magic comments", to allow simple mapping of GeneratorClass#generatorMethod() to inject dynamic source content. //@generateWith(GeneratorClass)// -Sets the current generator. You may use as many as you please //generatorMethod(arbitrary-string-data-you-may-want-to-parse)// -invokes the named method on the current injector, with any text (between brackets) sent as a string This allows you to markup default source with hooks where you may want to inject arbitrary code. It is especially useful for generating super-source in gwt compiles; changes to the default class are propagated to overrides.

Group: net.wetheinter Artifact: xapi-template
Show documentation Show source 
 

0 downloads
Artifact xapi-template
Group net.wetheinter
Version 0.2
Last update 20. February 2013
Organization The Internet Party
URL https://github.com/WeTheInternet/xapi-template
License The Apache Software License, Version 2.0
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!

geokey from group io.github.markrileybot (version 0.1.0)

# geokey K Dimensional Z-Order curve utils. [![Build Status](https://travis-ci.org/markrileybot/geokey.svg?branch=master)](https://travis-ci.org/markrileybot/geokey) [![Coverage Status](https://coveralls.io/repos/github/markrileybot/geokey/badge.svg?branch=master)](https://coveralls.io/github/markrileybot/geokey?branch=master) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.markrileybot/geokey/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.markrileybot/geokey) ## Building ./gradlew build ## Gradle dependency See https://search.maven.org/artifact/io.github.markrileybot/geokey/ ## Using ### Use built in keys to make geohashes ```java import org.geokey.GeoKey; // Make a geo hash key String key = new GeoKey().setLatitude(48.669).setLongitude(-4.329).toString(); // "gbsuv7ztqzpts82uzfwq5e1bp" // parse a geo hash key GeoKey gk = new GeoKey("gbsuv7ztqzpts82uzfwq5e1bp"); ``` ### Make a special purpose K-Dimensional key ```java public class GeoTimeKey extends KDKey { private static final KDKeySpec spec = new KDKeySpec.Builder() .addDim(-180, 180, 1) .addDim(-90, 90, 1) .addDim(0, 1L << 62, 1) .setAlphabet(Alphabet.GEO_TIME_HASH) .build(); public GeoTimeKey() { super(spec); } public GeoTimeKey(String s) { super(spec, s); } public GeoTimeKey(byte[] s) { super(spec, s); } public GeoTimeKey setLatitude(double latitude) { set(1, latitude); return this; } public double getLatitude() { return super.get(1); } public GeoTimeKey setLongitude(double longitude) { set(0, longitude); return this; } public double getLongitude() { return super.get(0); } public GeoTimeKey setTime(long time) { set(2, time); return this; } public long getTime() { return (long) get(2); } } ```

Group: io.github.markrileybot Artifact: geokey
Show all versions Show documentation Show source 
 

0 downloads
Artifact geokey
Group io.github.markrileybot
Version 0.1.0
Last update 20. June 2022
Organization not specified
URL https://github.com/markrileybot/geokey
License Apache License, Version 2.0
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!

romaji from group com.github.jikyo (version 0.0.4)

`Romaji` is a converter library to romanize Japanese hiragana/katakana string by standard and IME typing style. Even though [icu::Transliterator](http://userguide.icu-project.org/transforms/general) already has provided the same functions, and returns only one romanized string. However, there exists several different romanization systems, so one hiragana/katakana string has so many romanize string. For example, `"ちゃ"` can be romanized as `"cha"`, `"tya"`, `"chixya"`, `"tixya"`, `"chilya"`, or `"tilya"`. `Romaji` provides romanized strings as many as possible. If an input string contained non hiragana/katakana characters (includes kanji), `Romaji` return the characters as same as the input. For example, `Romaji` converts the input `"お茶の水"` to `"o茶no水"`. The mapping from hiragana/katakana to romaji is based on common IME's system to type Japanese on a computer. Therefor, `Romaji` does not directly implement the standard system like Hepburn, Nihon-shiki or Kunrei-shiki, but includes them.

Group: com.github.jikyo Artifact: romaji
Show all versions Show documentation Show source 
 

0 downloads
Artifact romaji
Group com.github.jikyo
Version 0.0.4
Last update 14. May 2019
Organization not specified
URL https://github.com/jikyo/romaji4j
License The Apache Software License, Version 2.0
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!

pmd from group pmd (version 4.3)

<p>PMD scans Java source code and looks for potential problems like:</p> <ul> <li>Possible bugs - empty try/catch/finally/switch statements</li> <li>Dead code - unused local variables, parameters and private methods</li> <li>Suboptimal code - wasteful String/StringBuffer usage</li> <li>Overcomplicated expressions - unnecessary if statements, for loops that could be while loops</li> <li>Duplicate code - copied/pasted code means copied/pasted bugs</li> </ul> <p>You can <b><a href="http://sourceforge.net/project/showfiles.php?group_id=56262">download everything from here</a></b>, and you can get an overview of all the rules at the <a href="rules/index.html">rulesets index</a> page.</p> <p>PMD is <a href="integrations.html">integrated</a> with JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, CodeGuide, NetBeans/Sun Java Studio Enterprise/Creator, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, and Emacs.</p>

Group: pmd Artifact: pmd
Show all versions Show documentation Show source 
 

5 downloads
Artifact pmd
Group pmd
Version 4.3
Last update 11. November 2011
Organization InfoEther
URL http://pmd.sourceforge.net/
License BSD-style
Dependencies amount 4
Dependencies ant, jaxen, asm, junit,
There are maybe transitive dependencies!

pmd-jdk14 from group pmd (version 4.2.5)

<p>PMD scans Java source code and looks for potential problems like:</p> <ul> <li>Possible bugs - empty try/catch/finally/switch statements</li> <li>Dead code - unused local variables, parameters and private methods</li> <li>Suboptimal code - wasteful String/StringBuffer usage</li> <li>Overcomplicated expressions - unnecessary if statements, for loops that could be while loops</li> <li>Duplicate code - copied/pasted code means copied/pasted bugs</li> </ul> <p>You can <b><a href="http://sourceforge.net/project/showfiles.php?group_id=56262">download everything from here</a></b>, and you can get an overview of all the rules at the <a href="rules/index.html">rulesets index</a> page.</p> <p>PMD is <a href="integrations.html">integrated</a> with JDeveloper, Eclipse, JEdit, JBuilder, BlueJ, CodeGuide, NetBeans/Sun Java Studio Enterprise/Creator, IntelliJ IDEA, TextPad, Maven, Ant, Gel, JCreator, and Emacs.</p>

Group: pmd Artifact: pmd-jdk14
Show all versions 
 

2 downloads
Artifact pmd-jdk14
Group pmd
Version 4.2.5
Last update 09. February 2009
Organization InfoEther
URL http://pmd.sourceforge.net/
License not specified
Dependencies amount 6
Dependencies ant, jaxen, asm, junit, backport-util-concurrent, retroweaver-rt,
There are maybe transitive dependencies!

pact-jvm-provider-junit5-spring from group au.com.dius (version 4.0.10)

# Pact Spring/JUnit5 Support This module extends the base [Pact JUnit5 module](../pact-jvm-provider-junit5). See that for more details. For writing Spring 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 `@ExtendWith(SpringExtension.class)` and one of the pact source annotations to your test class (as per a JUnit 5 test), then add a method annotated with `@TestTemplate` and `@ExtendWith(PactVerificationSpringProvider.class)` that takes a `PactVerificationContext` parameter. You will need to call `verifyInteraction()` on the context parameter in your test template method. For example: ```java @ExtendWith(SpringExtension.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) @Provider(&quot;Animal Profile Service&quot;) @PactBroker public class ContractVerificationTest { @TestTemplate @ExtendWith(PactVerificationSpringProvider.class) void pactVerificationTestTemplate(PactVerificationContext context) { context.verifyInteraction(); } } ``` You will now be able to setup all the required properties using the Spring context, e.g. creating an application YAML file in the test resources: ```yaml pactbroker: host: your.broker.host auth: username: broker-user password: broker.password ``` You can also run pact tests against `MockMvc` without need to spin up the whole application context which takes time and often requires more additional setup (e.g. database). In order to run lightweight tests just use `@WebMvcTest` from Spring and `MockMvcTestTarget` as a test target before each test. For example: ```java @WebMvcTest @Provider(&quot;myAwesomeService&quot;) @PactBroker class ContractVerificationTest { @Autowired private MockMvc mockMvc; @TestTemplate @ExtendWith(PactVerificationInvocationContextProvider.class) void pactVerificationTestTemplate(PactVerificationContext context) { context.verifyInteraction(); } @BeforeEach void before(PactVerificationContext context) { context.setTarget(new MockMvcTestTarget(mockMvc)); } } ``` You can also use `MockMvcTestTarget` for tests without spring context by providing the controllers manually. For example: ```java @Provider(&quot;myAwesomeService&quot;) @PactFolder(&quot;pacts&quot;) class MockMvcTestTargetStandaloneMockMvcTestJava { @TestTemplate @ExtendWith(PactVerificationInvocationContextProvider.class) void pactVerificationTestTemplate(PactVerificationContext context) { context.verifyInteraction(); } @BeforeEach void before(PactVerificationContext context) { MockMvcTestTarget testTarget = new MockMvcTestTarget(); testTarget.setControllers(new DataResource()); context.setTarget(testTarget); } @RestController static class DataResource { @GetMapping(&quot;/data&quot;) @ResponseStatus(HttpStatus.NO_CONTENT) void getData(@RequestParam(&quot;ticketId&quot;) String ticketId) { } } } ``` **Important:** Since `@WebMvcTest` starts only Spring MVC components you can&apos;t use `PactVerificationSpringProvider` and need to fallback to `PactVerificationInvocationContextProvider`

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

0 downloads
Artifact pact-jvm-provider-junit5-spring
Group au.com.dius
Version 4.0.10
Last update 18. April 2020
Organization not specified
URL https://github.com/DiUS/pact-jvm
License Apache 2
Dependencies amount 0
Dependencies No dependencies
There are maybe transitive dependencies!

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

Pact provider ============= sub project of https://github.com/DiUS/pact-jvm The pact provider is responsible for verifying that an API provider adheres to a number of pacts authored by its clients This library provides the basic tools required to automate the process, and should be usable on its own in many instances. Framework and build tool specific bindings will be provided in separate libraries that build on top of this core functionality. ### Provider State Before each interaction is executed, the provider under test will have the opportunity to enter a state. Generally the state maps to a set of fixture data for mocking out services that the provider is a consumer of (they will have their own pacts) The pact framework will instruct the test server to enter that state by sending: POST &quot;${config.stateChangeUrl.url}/setup&quot; { &quot;state&quot; : &quot;${interaction.stateName}&quot; } ### An example of running provider verification with junit This example uses Groovy, JUnit 4 and Hamcrest matchers to run the provider verification. As the provider service is a DropWizard application, it uses the DropwizardAppRule to startup the service before running any test. **Warning:** It only grabs the first interaction from the pact file with the consumer, where there could be many. (This could possibly be solved with a parameterized test) ```groovy class ReadmeExamplePactJVMProviderJUnitTest { @ClassRule public static TestRule startServiceRule = new DropwizardAppRule&lt;DropwizardConfiguration&gt;( TestDropwizardApplication.class, ResourceHelpers.resourceFilePath(&quot;dropwizard/test-config.yaml&quot;)) private static ProviderInfo serviceProvider private static Pact&lt;RequestResponseInteraction&gt; testConsumerPact private static ConsumerInfo consumer @BeforeClass static void setupProvider() { serviceProvider = new ProviderInfo(&quot;Dropwizard App&quot;) serviceProvider.setProtocol(&quot;http&quot;) serviceProvider.setHost(&quot;localhost&quot;) serviceProvider.setPort(8080) serviceProvider.setPath(&quot;/&quot;) consumer = new ConsumerInfo() consumer.setName(&quot;test_consumer&quot;) consumer.setPactSource(new UrlSource( ReadmeExamplePactJVMProviderJUnitTest.getResource(&quot;/pacts/zoo_app-animal_service.json&quot;).toString())) testConsumerPact = PactReader.loadPact(consumer.getPactSource()) as Pact&lt;RequestResponseInteraction&gt; } @Test void runConsumerPacts() { // grab the first interaction from the pact with consumer Interaction interaction = testConsumerPact.interactions.get(0) // setup the verifier ProviderVerifier verifier = setupVerifier(interaction, serviceProvider, consumer) // setup any provider state // setup the client and interaction to fire against the provider ProviderClient client = new ProviderClient(serviceProvider, new HttpClientFactory()) Map&lt;String, Object&gt; failures = new HashMap&lt;&gt;() verifier.verifyResponseFromProvider(serviceProvider, interaction, interaction.getDescription(), failures, client) if (!failures.isEmpty()) { verifier.displayFailures(failures) } // Assert all good assertThat(failures, is(empty())) } private ProviderVerifier setupVerifier(Interaction interaction, ProviderInfo provider, ConsumerInfo consumer) { ProviderVerifier verifier = new ProviderVerifier() verifier.initialiseReporters(provider) verifier.reportVerificationForConsumer(consumer, provider) if (!interaction.getProviderStates().isEmpty()) { for (ProviderState providerState: interaction.getProviderStates()) { verifier.reportStateForInteraction(providerState.getName(), provider, consumer, true) } } verifier.reportInteractionDescription(interaction) return verifier } } ``` ### An example of running provider verification with spock This example uses groovy and spock to run the provider verification. Again the provider service is a DropWizard application, and is using the DropwizardAppRule to startup the service. This example runs all interactions using spocks Unroll feature ```groovy class ReadmeExamplePactJVMProviderSpockSpec extends Specification { @ClassRule @Shared TestRule startServiceRule = new DropwizardAppRule&lt;DropwizardConfiguration&gt;(TestDropwizardApplication, ResourceHelpers.resourceFilePath(&apos;dropwizard/test-config.yaml&apos;)) @Shared ProviderInfo serviceProvider ProviderVerifier verifier def setupSpec() { serviceProvider = new ProviderInfo(&apos;Dropwizard App&apos;) serviceProvider.protocol = &apos;http&apos; serviceProvider.host = &apos;localhost&apos; serviceProvider.port = 8080 serviceProvider.path = &apos;/&apos; serviceProvider.hasPactWith(&apos;zoo_app&apos;) { pactSource = new FileSource(new File(ResourceHelpers.resourceFilePath(&apos;pacts/zoo_app-animal_service.json&apos;))) } } def setup() { verifier = new ProviderVerifier() } def cleanup() { // cleanup provider state // ie. db.truncateAllTables() } def cleanupSpec() { // cleanup provider } @Unroll def &quot;Provider Pact - With Consumer #consumer&quot;() { expect: verifyConsumerPact(consumer).empty where: consumer &lt;&lt; serviceProvider.consumers } private Map verifyConsumerPact(ConsumerInfo consumer) { Map failures = [:] verifier.initialiseReporters(serviceProvider) verifier.runVerificationForConsumer(failures, serviceProvider, consumer) if (!failures.empty) { verifier.displayFailures(failures) } failures } } ```

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

3 downloads
Artifact pact-jvm-provider_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 9
Dependencies pact-jvm-model, pact-jvm-pact-broker, pact-jvm-matchers_2.12, commons-io, jansi, httpclient, reflections, pact-jvm-support, scala-java8-compat_2.12,
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 &amp; 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(&quot;myAwesomeService&quot;) // Set up name of tested provider @PactFolder(&quot;pacts&quot;) // 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&apos;re not using (and don&apos;t want to use) a Spring test runner. @InjectMocks private AwesomeController awesomeController = new AwesomeController(); //Mock your service logic class. We&apos;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(&quot;default&quot;, &quot;no-data&quot;) // Method will be run before testing interactions that require &quot;default&quot; or &quot;no-data&quot; state public void toDefaultState() { target.setRunTimes(3); //let&apos;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(&quot;error-case&quot;) 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 -&gt; { 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(&quot;pricing&quot;) @PactBroker(protocol = &quot;https&quot;, host = &quot;${pactBrokerHost}&quot;, port = &quot;443&quot;, authentication = @PactBrokerAuth(username = &quot;${pactBrokerUser}&quot;, password = &quot;${pactBrokerPassword}&quot;)) @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 = &quot;VisibilityModifier&quot;) public final Target target = new HttpTarget(8091); @State(&quot;Product X010000021 exists&quot;) public void setupProductX010000021() throws IOException { reset(productClient); ProductBuilder product = new ProductBuilder() .withProductCode(&quot;X010000021&quot;); when(productClient.fetch((Set&lt;String&gt;) argThat(contains(&quot;X010000021&quot;)), any())).thenReturn(product); } @State(&quot;the product code X00001 can be priced&quot;) public void theProductCodeX00001CanBePriced() throws IOException { reset(productClient); ProductBuilder product = new ProductBuilder() .withProductCode(&quot;X00001&quot;); when(productClient.find((Set&lt;String&gt;) argThat(contains(&quot;X00001&quot;)), 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: &quot;your.broker.local&quot; port: &quot;443&quot; protocol: &quot;https&quot; auth: username: &quot;&lt;your broker username&gt;&quot; password: &quot;&lt;your broker password&gt;&quot; ``` Then you can use the defaults on the `@PactBroker` annotation. ```java @RunWith(SpringRestPactRunner.class) @Provider(&quot;My Service&quot;) @PactBroker( authentication = @PactBrokerAuth(username = &quot;${pactbroker.auth.username}&quot;, password = &quot;${pactbroker.auth.password}&quot;) ) @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(&quot;My Service&quot;) @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!



Page 108 from 112 (items total 1113)


© 2015 - 2024 Weber Informatics LLC | Privacy Policy