Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateProducerTest.java file needs to be updated #105

Open
anchit-h opened this issue Apr 30, 2021 · 0 comments
Open

DateProducerTest.java file needs to be updated #105

anchit-h opened this issue Apr 30, 2021 · 0 comments

Comments

@anchit-h
Copy link

As it currently stands running this code leads to the following error:

"C:\Program Files\Java\jdk1.8.0_251\bin\java.exe" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.2\lib\idea_rt.jar=53615:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.2\lib\idea_rt.jar" com.intellij.rt.execution.CommandLineWrapper C:\Users\anchit\AppData\Local\Temp\idea_classpath700658868 com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit4 pactContract.provisioning.PactProviderTest
12:46:12.130 [main] DEBUG au.com.dius.pact.provider.junit.PactRunner - Found annotation @au.com.dius.pact.provider.junitsupport.Provider(value=providerSiteProvisioning)
12:46:12.139 [main] DEBUG au.com.dius.pact.provider.junit.PactRunner - Found annotation @au.com.dius.pact.provider.junitsupport.Consumer(value=consumerSearchIndexer)
12:46:13.311 [main] DEBUG au.com.dius.pact.provider.ProviderUtils - Pact source does not have a constructor with one argument of type Class
org.junit.runners.model.InitializationError
	at au.com.dius.pact.provider.junit.InteractionRunner.validate(InteractionRunner.kt:98)
	at au.com.dius.pact.provider.junit.InteractionRunner.<init>(InteractionRunner.kt:67)
	at au.com.dius.pact.provider.junit.PactRunner.newInteractionRunner(PactRunner.kt:143)
	at au.com.dius.pact.provider.junit.PactRunner.setupInteractionRunners(PactRunner.kt:134)
	at au.com.dius.pact.provider.junit.PactRunner.initialize(PactRunner.kt:127)
	at au.com.dius.pact.provider.junit.PactRunner.getChildren(PactRunner.kt:151)
	at org.junit.runners.ParentRunner.getFilteredChildren(ParentRunner.java:426)
	at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:351)
	at com.intellij.junit4.JUnit4IdeaTestRunner.getDescription(JUnit4IdeaTestRunner.java:79)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:51)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:63)

Process finished with exit code -2

This can be fixed by updating the test target in the DateProducerTest.java file to the following:

@testtarget
public final Target target = new MessageTarget();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant