1 Jun 2009 15:03
Re: exactly(n) function in JMock
Here's my test :
import org.jmock.Expectations;
import org.jmock.Mockery;
import org.jmock.integration.junit4.JUnit4Mockery;
import org.junit.Before;
import org.junit.Test;
public class ExactlyTest {
private interface IDao {
void someMetod();
}
private class SomeService {
private IDao dao;
private void someServiceMethod() {
//First call
dao.someMetod();
//Second call
dao.someMetod();
}
public void setDao(IDao dao) {
this.dao = dao;
}
}
(Continue reading)
RSS Feed