作者:mobiledu2502891413 | 来源:互联网 | 2023-09-23 10:11
本文整理了Java中org.junit.AssumptionViolatedException.getMessage()
方法的一些代码示例,展示了AssumptionViolatedException.getMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AssumptionViolatedException.getMessage()
方法的具体详情如下:
包路径:org.junit.AssumptionViolatedException
类名称:AssumptionViolatedException
方法名:getMessage
AssumptionViolatedException.getMessage介绍
暂无
代码示例
代码示例来源:origin: io.github.aktoluna/slnarch-report
@Override
protected void skipped(AssumptionViolatedException e, Description description) {
super.skipped(e, description);
reportManager.getExtentTest()
.skip(MarkupHelper.createCodeBlock(e.getMessage()))
.skip(String.format("Skip Test=%s cause=%s", description.getMethodName(), e.getMessage()),
reportManager.createMediaEntity(takeScreenShotWithSave()));
}
代码示例来源:origin: hamcrest/hamcrest-junit
@Test
public void failingAssumeWithMessageReportsBothMessageAndMatcher() {
String message = "Some random message string.";
Matcher assumption = equalTo(4);
try {
assumeThat(message, 3, assumption);
} catch (org.junit.AssumptionViolatedException e) {
assertTrue(e.getMessage().contains(message));
assertTrue(e.getMessage().contains(StringDescription.toString(assumption)));
}
}
}
代码示例来源:origin: hamcrest/hamcrest-junit
@Test
public void failingAssumeThrowsPublicAssumptionViolatedException() {
Matcher assumption = equalTo(4);
try {
assumeThat(3, assumption);
} catch (org.junit.AssumptionViolatedException e) {
assertTrue(e.getMessage().contains(StringDescription.toString(assumption)));
}
}