103104105106107108109110
// Syntactic sugar methods that use our Mock class protected Object stub(Class type) { Mock mock = new Mock(type); mock.setDefaultStub(new DefaultResultStub()); return mock.proxy(); }
109110111112113114115116
return mock.proxy(); } protected Object stub(Class type, String name) { Mock mock = new Mock(type, name); mock.setDefaultStub(new DefaultResultStub()); return mock.proxy(); }
81828384858687
throw new NestedVerificationException(e.getMessage(), exceptionFromCreationPoint); } } public void stubsEverythingElse() { setDefaultStub(new DefaultResultStub()); }