forked from pact-foundation/pact-jvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
752 additions
and
374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
core/pact-broker/src/test/groovy/au/com/dius/pact/core/pactbroker/TestResultSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package au.com.dius.pact.core.pactbroker | ||
|
||
import spock.lang.Specification | ||
import spock.lang.Unroll | ||
|
||
@SuppressWarnings('LineLength') | ||
class TestResultSpec extends Specification { | ||
|
||
@Unroll | ||
def 'merging results test'() { | ||
expect: | ||
result1.merge(result2) == result3 | ||
|
||
where: | ||
|
||
result1 | result2 | result3 | ||
TestResult.Ok.INSTANCE | TestResult.Ok.INSTANCE | TestResult.Ok.INSTANCE | ||
TestResult.Ok.INSTANCE | new TestResult.Failed(['Bang']) | new TestResult.Failed(['Bang']) | ||
new TestResult.Failed(['Bang']) | TestResult.Ok.INSTANCE | new TestResult.Failed(['Bang']) | ||
new TestResult.Failed(['Bang']) | new TestResult.Failed(['Boom', 'Splat']) | new TestResult.Failed(['Bang', 'Boom', 'Splat']) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Pact Publish | ||
|
||
Module for generating and publishing pacts to the pact broker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
buildscript { | ||
dependencies { | ||
classpath "au.com.dius:pact-jvm-provider-gradle:4.0.0-beta.1" | ||
} | ||
} | ||
|
||
if (System.env.PACT_PUBLISH == 'true') { | ||
apply plugin: 'au.com.dius.pact' | ||
} | ||
|
||
dependencies { | ||
testCompile project(":consumer:pact-jvm-consumer-groovy") | ||
} | ||
|
||
if (System.env.PACT_PUBLISH == 'true') { | ||
pact { | ||
publish { | ||
pactBrokerUrl = 'https://pact-foundation.pact.dius.com.au' | ||
if (project.hasProperty('pactBrokerToken')) { | ||
pactBrokerToken = project.pactBrokerToken | ||
} | ||
excludes = ['JVM Pact Broker Client-Imaginary Pact Broker'] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.