1 4 package com.mockobjects.dynamic; 5 6 9 public class ThrowStub 10 extends CallStub 11 { 12 private Throwable throwable; 13 14 public ThrowStub( Throwable throwable ) { 15 this.throwable = throwable; 16 } 17 18 public Object call(Mock mock, String methodName, Object [] args) throws Throwable { 19 throw throwable; 20 } 21 22 public String getDescription() { 23 return "throws <" + throwable + ">"; 24 } 25 } 26 | Popular Tags |