Clover coverage report - jMock - 1.0-beta1
Coverage timestamp: Sat Nov 29 2003 19:35:59 GMT
file stats: LOC: 32   Methods: 4
NCLOC: 23   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
InvocationMockerBuilder.java - 100% 100% 100%
coverage
 1   
 /* Copyright (c) 2000-2003, jMock.org. See bundled LICENSE.txt */
 2   
 package org.jmock.dynamic;
 3   
 
 4   
 import org.jmock.stub.ReturnStub;
 5   
 import org.jmock.stub.StubBuilder;
 6   
 import org.jmock.stub.ThrowStub;
 7   
 import org.jmock.stub.VoidStub;
 8   
 
 9   
 public class InvocationMockerBuilder implements StubBuilder, ExpectationBuilder {
 10   
 
 11   
     private InvocationMocker mocker;
 12   
 
 13  8
     public InvocationMockerBuilder(InvocationMocker mocker) {
 14  8
         this.mocker = mocker;
 15   
     }
 16   
 
 17  2
     public ExpectationBuilder isVoid() {
 18  2
         mocker.setStub(new VoidStub());
 19  2
         return this;
 20   
     }
 21   
 
 22  2
     public ExpectationBuilder returns(Object returnValue) {
 23  2
         mocker.setStub(new ReturnStub(returnValue));
 24  2
         return this;
 25   
     }
 26   
 
 27  2
     public ExpectationBuilder willThrow(Throwable throwable) {
 28  2
         mocker.setStub(new ThrowStub(throwable));
 29  2
         return this;
 30   
     }
 31   
 }
 32