Menu

Setup Method found in eclipse but not in ant

Users
blume11
2014-09-03
2014-09-05
  • blume11

    blume11 - 2014-09-03

    Hi,
    i have a test class with
    @RunWith(UnitilsJUnit4TestClassRunner.class)
    public class DBLookupTest

    and
    @Before
    public void setup()

    Running the test in eclipse is fine, starting the same test in ant gives me:

    <error message="Unable to find indexes of argument matcher. Method not found: setup"     type="org.unitils.core.UnitilsException">org.unitils.core.UnitilsException:     Unable     to find indexes of argument matcher. Method not found: setup
        at     org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.getArgumentMatcherIndexes(    ArgumentMatcherPositionFinder.java:96)
        at     org.unitils.mock.argumentmatcher.ArgumentMatcherPositionFinder.getArgumentMatcherIndexes(    ArgumentMatcherPositionFinder.java:62)
        at     org.unitils.mock.core.matching.MatchingInvocationBuilder.createArgumentMatchers(MatchingI    nvocationBuilder.java:99)
        at     org.unitils.mock.core.matching.MatchingInvocationBuilder.handleProxyInvocation(MatchingIn    vocationBuilder.java:86)
        at     org.unitils.mock.core.matching.MatchingInvocationBuilder$InvocationHandler.handleInvocati    on(MatchingInvocationBuilder.java:124)
        at     org.unitils.mock.core.proxy.CglibProxyMethodInterceptor.intercept(CglibProxyMethodInterce    ptor.java:82)
        a
    

    Any ideas would be appreciated,
    thanks
    Karsten

     
  • Thomas De Rycke

    Thomas De Rycke - 2014-09-03

    I am no ant specialist but this seems like a classpath issue to me.

    Maybe consider moving to maven, ant is so old....

     
  • blume11

    blume11 - 2014-09-05

    Yes, the classpath - i checked it and i have the same Junit version 4.11 in
    ...\plugins\org.junit_4.11.0.v201303080030\junit.jar
    and in my ant classpath, ant in eclipse is 1.8.4 installed is 1.9.2, same and only Unitils jars 3.4.2. for modules core and mock.

     

Anonymous
Anonymous

Add attachments
Cancel