📄 assertion.java
字号:
package org.uispec4j.assertion;
/**
* Interface used for defining conditions. These assertions are meant to be used
* essentially with the {@link UISpecAssert] "assertXxx" and "waitUntil" methods.
*/
public abstract class Assertion {
/**
* Returns true if the {@link #check()} method does not fail.
*/
public final boolean isTrue() {
try {
check();
return true;
}
catch (Throwable e) {
return false;
}
}
/**
* Throws an exception if the condition is not true.
*/
public abstract void check() throws Exception;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -