我有 4 个步骤定义类和一组域对象类。我的第一步定义类如下所示:
public class ClaimProcessSteps {
Claim claim;
public ClaimProcessSteps(Claim w){
this.claim = w;
}
@Given("^a claim submitted with different enrolled phone's model$")
public void aClaimSubmittedFromCLIENTSChannelWithDifferentEnrolledPhoneSModel() throws Throwable {
claim = ObjMotherClaim.aClaimWithAssetIVH();
}
}
我的 Claim 类如下所示:
public class Claim {
private String claimType;
private String clientName;
private Customer caller;
private List<Hold> holds;
public Claim() {}
public Claim(String claimType, String clientName, Customer caller) {
this.claimType = claimType;
this.clientName = clientName;
this.caller = caller;
}
public String getClaimType() {
return claimType;
}
我的第二步定义类如下所示:
public class CaseLookupSteps {
Claim claim;
public CaseLookupSteps(Claim w){
this.claim = w;
}
@When("^I access case via (right|left) search$")
public void iAccessCaseInCompassViaRightSearch(String searchVia) throws Throwable {
System.out.println(claim.getClaimType());
}
我已经在我的 POM.XML 中导入了 picocontainer 依赖项,并且收到以下错误。
对于“class java.lang.String”来说,3 个可满足的构造函数太多了。构造函数列表:[(Buffer), (Builder), ()]
我的步骤定义类构造函数都没有接收原语作为参数。有没有人知道为什么我仍然收到该错误?会不会是我的业务对象构造函数在其构造函数中期望一个字符串?
提前感谢您的帮助。