An assertion cannot be used with class variable declarations for instance, but can be placed within any method.
不能将断言同实例的类变量声明一块使用,但却可以将其置于任何方法内。
You can add assertion statements as the pre- or post-conditions of a method.
可以将断言语句作为方法的前置条件或后置条件来添加。
The ContractManager interface defines a different method for each kind of assertion you want to check.
ContractManager接口为要检查的每一种断言定义了不同的方法。
The assertion starts with the method should, and then adds some kind of comparison.
该断言从should方法开始,然后添加了一些比较关系。
Now add another assertion to the test case to test the new balance after somebody calls the deposit() method. The testDeposit() method should now look like Listing 3
现在向测试案例添加另一种断言,以在某些人调用 deposit()方法后测试新的余额。
The Request Parser calls method setAuthData() in the control object to set the SAML assertion coming from the value of authData tag in the transaction request.
请求解析器调用控制对象中的setAuthData()方法,从而设置来自事务请求中的 authData标记值的SAML断言。
The last method invoked, verifyForward , is an assertion-like method found in the MockStrutsTestCase class that verifies the proper forward.
最后调用的方法verifyforward是在MockStrutsTestCase类中找到的一个类似于断言的方法,它验证正确的转发。
It's shown by the experiments that the assertion verification method presented in this paper not only is feasible but also has little verification cost.
实验表明,提出的全自动静态断言验证方法不仅可行,而且验证代价较小,具有较强的实用性。
Whereas an assertion tells you only about a detected bad symptom, a Code Contract can show invaluable information on how the method should be used.
而断言告诉您只对检测到的不良症状,则代码合同可以显示宝贵的资讯应如何使用该方法。
Whereas an assertion tells you only about a detected bad symptom, a Code Contract can show invaluable information on how the method should be used.
而断言告诉您只对检测到的不良症状,则代码合同可以显示宝贵的资讯应如何使用该方法。
应用推荐