keeganwitt / gmock

Automatically exported from code.google.com/p/gmock
6 stars 2 forks source link

MissingMethodException #108

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
hi

first of all the Exception, and @ the end the Stacktrace
No signature of method: 
org.gmock.internal.signature.MatchAnyParameterSignature.size()

What steps will reproduce the problem?
1. partial mocking an Class (in my case one S3Object out of the jets3t s3 lib) 
and not mocking the specified method, even with mocking i get this one.
2. calling isDirectoryPlaceholder() causes this exception

What is the expected output? What do you see instead?
I would expect that there wont be an exception and the method is in 
MatchAnyParametersSignature. but it is maybe injected somehow, and i dont have 
the time to investigate

Please provide any additional information below.

No signature of method: 
org.gmock.internal.signature.MatchAnyParameterSignature.size() is applicable 
for argument types: () values: []
Possible solutions: is(java.lang.Object), with(groovy.lang.Closure), 
use([Ljava.lang.Object;), sleep(long), find(groovy.lang.Closure), sleep(long, 
groovy.lang.Closure)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:54)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:51)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
    at org.gmock.internal.signature.BaseMethodSignature.isGetter(BaseMethodSignature.groovy:76)
    at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1602)
    at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3311)
    at org.gmock.internal.signature.BaseMethodSignature.getProperty(BaseMethodSignature.groovy)
    at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:239)
    at org.gmock.internal.signature.BaseMethodSignature.getGetterName(BaseMethodSignature.groovy:88)
    at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1602)
    at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3311)
    at org.gmock.internal.signature.BaseMethodSignature.getProperty(BaseMethodSignature.groovy)
    at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:239)
    at org.gmock.internal.signature.BaseMethodSignature.match(BaseMethodSignature.groovy:52)
    at org.gmock.internal.signature.MethodSignature.super$2$match(MethodSignature.groovy)
    at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:127)
    at org.gmock.internal.signature.MethodSignature.match(MethodSignature.groovy:47)
    at org.gmock.internal.signature.MethodSignature$match.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.gmock.internal.signature.MethodSignature$match.call(Unknown Source)
    at org.gmock.internal.expectation.ExpectationCollection$_findSignature_closure4.doCall(ExpectationCollection.groovy:71)
    at sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:273)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
    at groovy.lang.Closure.call(Closure.java:282)
    at groovy.lang.Closure.call(Closure.java:295)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.find(DefaultGroovyMethods.java:1922)
    at org.codehaus.groovy.runtime.dgm$186.invoke(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:270)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)
    at org.gmock.internal.expectation.ExpectationCollection.findSignature(ExpectationCollection.groovy:71)
    at org.gmock.internal.expectation.ExpectationCollection$findSignature.call(Unknown Source)
    at org.gmock.internal.MockInternal.findSignature(MockInternal.groovy:138)
    at org.gmock.internal.metaclass.ConcreteMockProxyMetaClass$2.call(ConcreteMockProxyMetaClass.java:58)
    at org.gmock.internal.Callable$call.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.gmock.internal.Callable$call.call(Unknown Source)
    at org.gmock.internal.InternalMockController.doWork(InternalMockController.groovy:196)
    at org.gmock.internal.InternalMockController.this$2$doWork(InternalMockController.groovy)
    at org.gmock.internal.InternalMockController$this$2$doWork.callCurrent(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
    at org.gmock.internal.InternalMockController$this$2$doWork.callCurrent(Unknown Source)
    at org.gmock.internal.InternalMockController.doInternal(InternalMockController.groovy:185)
    at org.gmock.internal.InternalMockController$doInternal.callCurrent(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:44)
    at org.gmock.internal.InternalMockController$doInternal.callCurrent(Unknown Source)
    at org.gmock.internal.InternalMockController.doInternal(InternalMockController.groovy:178)
    at org.gmock.internal.metaclass.ConcreteMockProxyMetaClass.invokeMethod(ConcreteMockProxyMetaClass.java:50)
    at org.gmock.internal.metaclass.ConcreteMockProxyMetaClass.invokeMethod(ConcreteMockProxyMetaClass.java:46)

Original issue reported on code.google.com by Simon.Sc...@gmail.com on 17 Mar 2011 at 3:39

GoogleCodeExporter commented 8 years ago
I am afraid that I cannot reproduce this error. Please provide a reproduceable 
test case.

Original comment by JohnnyJianHY on 21 Mar 2011 at 11:04

GoogleCodeExporter commented 8 years ago
k i have to say i am sorry, it was my fault, some of my mocks were not working 
properly.

pls closed this issue and sorry for my less investigation into this problem.

Thanks

Original comment by Simon.Sc...@gmail.com on 22 Mar 2011 at 1:40

GoogleCodeExporter commented 8 years ago

Original comment by JohnnyJianHY on 22 Mar 2011 at 1:58