Skip to content

Commit

Permalink
fix: codenarc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Holshausen committed Jul 10, 2020
1 parent 0727ff4 commit 73f30e0
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ package au.com.dius.pact.provider.junit5

import au.com.dius.pact.core.model.Consumer
import au.com.dius.pact.core.model.FilteredPact
import au.com.dius.pact.core.model.Interaction
import au.com.dius.pact.core.model.PactBrokerSource
import au.com.dius.pact.core.model.Provider
import au.com.dius.pact.core.model.Request
import au.com.dius.pact.core.model.RequestResponseInteraction
import au.com.dius.pact.core.model.RequestResponsePact
import au.com.dius.pact.core.model.Response
import au.com.dius.pact.core.support.expressions.ValueResolver
import au.com.dius.pact.provider.*
import au.com.dius.pact.provider.IConsumerInfo
import au.com.dius.pact.provider.IProviderInfo
import au.com.dius.pact.provider.IProviderVerifier
import org.junit.jupiter.api.extension.ExtensionContext
import spock.lang.Specification

Expand All @@ -30,17 +31,17 @@ class PactVerificationExtensionSpec extends Specification {
getStore(_) >> store
}


def interaction1 = new RequestResponseInteraction('interaction1', [], new Request(), new Response())
def interaction2 = new RequestResponseInteraction('interaction2', [], new Request(), new Response())
def pact = new RequestResponsePact(new Provider(), new Consumer(), [interaction1, interaction2 ])
def filteredPact = new FilteredPact(pact, { it.description == 'interaction1' })
PactBrokerSource pactSource = new PactBrokerSource('localhost', '80', 'http')

context = new PactVerificationContext(store, extContext, Stub(TestTarget), Stub(IProviderVerifier), Stub(ValueResolver),
Stub(IProviderInfo), Stub(IConsumerInfo), interaction1, [])
context = new PactVerificationContext(store, extContext, Stub(TestTarget), Stub(IProviderVerifier),
Stub(ValueResolver), Stub(IProviderInfo), Stub(IConsumerInfo), interaction1, [])

PactVerificationExtension extension = new PactVerificationExtension(filteredPact, pactSource, interaction1, "service", "consumer")
PactVerificationExtension extension = new PactVerificationExtension(filteredPact, pactSource, interaction1,
'service', 'consumer')

when:
extension.afterTestExecution(extContext)
Expand All @@ -63,16 +64,16 @@ class PactVerificationExtensionSpec extends Specification {
getStore(_) >> store
}


def interaction1 = new RequestResponseInteraction('interaction1', [], new Request(), new Response())
def interaction2 = new RequestResponseInteraction('interaction2', [], new Request(), new Response())
def pact = new RequestResponsePact(new Provider(), new Consumer(), [interaction1, interaction2 ])
PactBrokerSource pactSource = new PactBrokerSource('localhost', '80', 'http')

context = new PactVerificationContext(store, extContext, Stub(TestTarget), Stub(IProviderVerifier), Stub(ValueResolver),
Stub(IProviderInfo), Stub(IConsumerInfo), interaction1, [])
context = new PactVerificationContext(store, extContext, Stub(TestTarget), Stub(IProviderVerifier),
Stub(ValueResolver), Stub(IProviderInfo), Stub(IConsumerInfo), interaction1, [])

PactVerificationExtension extension = new PactVerificationExtension(pact, pactSource, interaction1, "service", "consumer")
PactVerificationExtension extension = new PactVerificationExtension(pact, pactSource, interaction1,
'service', 'consumer')

when:
extension.afterTestExecution(extContext)
Expand Down

0 comments on commit 73f30e0

Please sign in to comment.