有兩個類。父項:B.子項:A. A.method1()覆蓋B的項目。 public class B {
protected boolean method1(){...};
}
public class A extends B {
protected boolean method1(){
boolean val = super.method1();
下面是我想測試的一個類(Class1),但我對我的單元測試並不完全滿意。請參閱下面的代碼示例。 被測系統 public interface IRepository {
string GetParameter(int id);
}
public class Repository {
public string GetParameter(int id) {
ret
我想創造一些特殊的存根方法stub_check和stub_chain_check,以確保該方法存在新的存根方法。 例如: #spec/controllers/payments_controller_spec.rb`
describe PaymentsController do
it "makes a payment" do
# Ensure method exists, P