I cannot seem to verify method with following signature:
public void write(File file, byte[] bytes)
I'm doing:
1 * collector.cachingFileWriter.write(new File(temp.dir, "FooTest.stderr.bin"),
"out".bytes)
it fails with:
java.lang.ClassCastException: [B cannot be cast to [Ljava.lang.Object;
at org.spockframework.mock.constraint.PositionalArgumentListConstraint.expandVarArgs(PositionalArgumentListConstraint.java:62)
at org.spockframework.mock.constraint.PositionalArgumentListConstraint.isSatisfiedBy(PositionalArgumentListConstraint.java:45)
at org.spockframework.mock.runtime.MockInteraction.matches(MockInteraction.java:65)
at org.spockframework.mock.runtime.MockInteractionDecorator.matches(MockInteractionDecorator.java:42)
at org.spockframework.mock.runtime.InteractionScope.match(InteractionScope.java:63)
at org.spockframework.mock.runtime.MockController.handle(MockController.java:36)
at org.spockframework.mock.runtime.JavaMockInterceptor.intercept(JavaMockInterceptor.java:72)
at org.spockframework.mock.runtime.CglibMockInterceptorAdapter.intercept(CglibMockInterceptorAdapter.java:30)
at org.gradle.api.internal.tasks.testing.junit.result.TestReportDataCollector.onOutput(TestReportDataCollector.java:80)
at org.gradle.api.internal.tasks.testing.junit.result.TestReportDataCollectorSpec.keeps track of outputs(TestReportDataCollectorSpec.groovy:130)
I worked around by changing the interface to take String instead of bytes
Original issue reported on code.google.com by szcze...@gmail.com on 19 Nov 2012 at 3:59
Original issue reported on code.google.com by
szcze...@gmail.com
on 19 Nov 2012 at 3:59