I hope everyone is having weekend. I, on the other hand, is struggling to figure this out. I'm not even sure what to search on.
I have the following sample class:
public class Temp{
private MyOven oven;
public Temp(){
oven = new MyOven();
}
public boolean foo(Apple apple) throws OvenException, PreparerException{
Preparer preparer = new Preparer();
PreparedPie preparedPie = preparer.prepare(apple);
CookedPie pie = oven.cook(preparedPie);
return pie.isGood();
}
}I'm currently using EasyMock to create mock objects for MyOven and Preparer. But I don't know how to tell the method to call my mock Preparer. Is there a simple way to do that?Thanks.
Edited by sourlemon, 08 August 2010 - 06:08 PM.


Sign In
Create Account


Back to top









