|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (JMOCK-235) Invocation count doesn't work as expectedInvocation count doesn't work as expected
----------------------------------------- Key: JMOCK-235 URL: http://jira.codehaus.org/browse/JMOCK-235 Project: jMock Issue Type: Bug Components: JMock 2.x.x Library Affects Versions: 2.5.1 Environment: Vista 32Bit, x86 Reporter: Christian Schwarz import org.jmock.integration.junit4.JUnit4Mockery; The invocation count doesn't work for "exactly" and "one" (maybe other sto). The following test expect exactly 999 invocations but there is only one, the test should fail but it doesn't. public class Test { Mockery context = new JUnit4Mockery(); @org.junit.Test public void test() { TestClass testClass = new TestClass(); final Runnable runnable = context.mock(Runnable.class); context.checking(new Expectations() { { exactly(999).of(runnable).run(); }}); // this should fail to, but.... //context.checking(new Expectations() { { // one(runnable).run(); // one(runnable).run(); // }}); testClass.invokeOnce(runnable); } class TestClass { public void invokeOnce(Runnable runnable) { runnable.run(); } } } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Resolved: (JMOCK-235) Invocation count doesn't work as expected[ http://jira.codehaus.org/browse/JMOCK-235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Christian Schwarz resolved JMOCK-235. ------------------------------------- Resolution: Not A Bug ups my fault, i forget -> context.assertIsSatisfied(); > Invocation count doesn't work as expected > ----------------------------------------- > > Key: JMOCK-235 > URL: http://jira.codehaus.org/browse/JMOCK-235 > Project: jMock > Issue Type: Bug > Components: JMock 2.x.x Library > Affects Versions: 2.5.1 > Environment: Vista 32Bit, x86 > Reporter: Christian Schwarz > > import org.jmock.integration.junit4.JUnit4Mockery; > The invocation count doesn't work for "exactly" and "one" (maybe other sto). The following test expect exactly 999 invocations but there is only one, the test should fail but it doesn't. > public class Test { > Mockery context = new JUnit4Mockery(); > @org.junit.Test > public void test() { > TestClass testClass = new TestClass(); > final Runnable runnable = context.mock(Runnable.class); > context.checking(new Expectations() { { > exactly(999).of(runnable).run(); > }}); > // this should fail to, but.... > //context.checking(new Expectations() { { > // one(runnable).run(); > // one(runnable).run(); > // }}); > testClass.invokeOnce(runnable); > } > class TestClass { > public void invokeOnce(Runnable runnable) { > runnable.run(); > } > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[jira] Closed: (JMOCK-235) Invocation count doesn't work as expected[ http://jira.codehaus.org/browse/JMOCK-235?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nat Pryce closed JMOCK-235. --------------------------- > Invocation count doesn't work as expected > ----------------------------------------- > > Key: JMOCK-235 > URL: http://jira.codehaus.org/browse/JMOCK-235 > Project: jMock > Issue Type: Bug > Components: JMock 2.x.x Library > Affects Versions: 2.5.1 > Environment: Vista 32Bit, x86 > Reporter: Christian Schwarz > > import org.jmock.integration.junit4.JUnit4Mockery; > The invocation count doesn't work for "exactly" and "one" (maybe other sto). The following test expect exactly 999 invocations but there is only one, the test should fail but it doesn't. > public class Test { > Mockery context = new JUnit4Mockery(); > @org.junit.Test > public void test() { > TestClass testClass = new TestClass(); > final Runnable runnable = context.mock(Runnable.class); > context.checking(new Expectations() { { > exactly(999).of(runnable).run(); > }}); > // this should fail to, but.... > //context.checking(new Expectations() { { > // one(runnable).run(); > // one(runnable).run(); > // }}); > testClass.invokeOnce(runnable); > } > class TestClass { > public void invokeOnce(Runnable runnable) { > runnable.run(); > } > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |