Clover coverage report - EasyMock 2.2
Coverage timestamp: Mo Apr 17 2006 21:21:22 CEST
file stats: LOC: 38   Methods: 3
NCLOC: 27   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
MockInvocationHandler.java 100% 100% 100% 100%
coverage
 1    /*
 2    * Copyright (c) 2001-2006 OFFIS, Tammo Freese.
 3    * This program is made available under the terms of the MIT License.
 4    */
 5    package org.easymock.internal;
 6   
 7    import java.lang.reflect.InvocationHandler;
 8    import java.lang.reflect.Method;
 9   
 10    public final class MockInvocationHandler implements InvocationHandler {
 11   
 12    final MocksControl control;
 13   
 14  366 public MockInvocationHandler(MocksControl control) {
 15  366 this.control = control;
 16    }
 17   
 18  984 public Object invoke(Object proxy, Method method, Object[] args)
 19    throws Throwable {
 20  984 try {
 21  984 if (control.getState() instanceof RecordState) {
 22  436 LastControl.reportLastControl(control);
 23    }
 24  984 return control.getState().invoke(
 25    new Invocation(proxy, method, args));
 26    } catch (RuntimeExceptionWrapper e) {
 27  1 throw e.getRuntimeException().fillInStackTrace();
 28    } catch (AssertionErrorWrapper e) {
 29  37 throw e.getAssertionError().fillInStackTrace();
 30    } catch (ThrowableWrapper t) {
 31  77 throw t.getThrowable().fillInStackTrace();
 32    }
 33    }
 34   
 35  104 public MocksControl getControl() {
 36  104 return control;
 37    }
 38    }