blob: 397ba8891477fcf4e91b266477f0fc29a1055c15 [file] [log] [blame]
package groovy.mock.interceptor
/**
Testing Groovy Stub support for single calls to the Collaborator
@author Dierk Koenig
*/
class StubSingleCallTest extends GroovyTestCase {
StubFor stub
void setUp() {
stub = new StubFor(Collaborator.class)
}
void testFirstOptionalOmitted() {
stub.demand.one(0..1) { 1 }
stub.use {
def caller = new Caller()
}
stub.expect.verify()
// Getting here means no exception, which is what we want to test. (Fix for GROOVY-2309)
}
}