{
ArrayList stubList = new ArrayList();
stubList.add("test\");
// 定义Mock剧本
mockDao.expects(once())// 期待次数
.method//Dao.java
package com.raistlin.test.jmock
public class Dao
{
public Dao()
{
}
public List execute(String sql)
{
//数据库操作...
}
}
//Business.java
package com.raistlin.test.jmock
public class Business
{
private Dao dao ;
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/