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

minTimes = 0 stopped working #319

Closed
Milbor-zz opened this issue Aug 12, 2016 · 1 comment
Closed

minTimes = 0 stopped working #319

Milbor-zz opened this issue Aug 12, 2016 · 1 comment

Comments

@Milbor-zz
Copy link

Milbor-zz commented Aug 12, 2016

This fails in 1.26 but was passing in 1.25:

public class SpikeTest {
    @Injectable
    private Service service;

    interface Service {
        void call();
    }

    @Test
    public void test() throws Exception {
        new Expectations() {{
            service.call();
            minTimes = 0;
        }};
    }
}
mockit.internal.MissingInvocation: Missing 1 invocation to:
cz.csob.spike.SpikeTest$Service#call()
   on mock instance: cz.csob.spike.$Proxy4@5ed241cb
    at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
    at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:109)
    at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
    at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
    at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
Caused by: Missing invocations
    at cz.csob.spike.SpikeTest$1.<init>(SpikeTest.java:19)
    at cz.csob.spike.SpikeTest.test(SpikeTest.java:18)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:606)
    ... 10 more

I don't see this mentioned in release notes. Has anything changed? Thanks

@rliesenfeld
Copy link
Member

Same as #315. The behavior change has been documented in the API documentation for the next release (1.27).

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

No branches or pull requests

2 participants