我想对嵌套在对象下的方法的返回值执行单元测试。例子:
package code.learn
import org.specs2.mutable._;
import com.learning.run.CMMDC;
class testing extends Specification {
val t1 = Map(1 -> 6, 7 -> 12, 9 -> 13);
"testing the results" in {
foreach(t1) {
case (key, value) =>
CMMDC.compute(key, value) must_== value;
}
}
}