本文整理了Java中org.testifyproject.TestContext.addError()
方法的一些代码示例,展示了TestContext.addError()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TestContext.addError()
方法的具体详情如下:
包路径:org.testifyproject.TestContext
类名称:TestContext
方法名:addError
[英]Add an error message to the test context if the given condition is true.
[中]如果给定条件为true,则向测试上下文添加错误消息。
代码示例来源:origin: org.testifyproject.di/di-jersey
@Override
public void verify(TestContext testContext) {
String className = "org.glassfish.jersey.inject.hk2.AbstractHk2InjectionManager";
Optional<Class> foundClass = ReflectionUtil.INSTANCE.load(className);
testContext.addError(
!foundClass.isPresent(),
"Please insure Jersey HK2 class '{}' is in the classpath",
className
);
}
代码示例来源:origin: org.testifyproject.junit4/spring-integration-test
@Override
public void verify(TestContext testContext) {
String className = "org.springframework.context.ApplicationContext";
Optional<Class> foundClass = ReflectionUtil.INSTANCE.load(className);
testContext.addError(
!foundClass.isPresent(),
"Please insure Spring Application Context class '{}' is in the classpath",
className
);
}
代码示例来源:origin: org.testifyproject.junit4/jersey2-system-test
@Override
public void verify(TestContext testContext) {
String className = "org.glassfish.jersey.server.ResourceConfig";
Optional<Class> foundClass = ReflectionUtil.INSTANCE.load(className);
testContext.addError(
!foundClass.isPresent(),
"Please insure Jersey 2 class '{}' is in the classpath",
className
);
}
代码示例来源:origin: org.testifyproject.junit4/guice-integration-test
@Override
public void verify(TestContext testContext) {
String className = "com.google.inject.Guice";
Optional<Class> foundClass = ReflectionUtil.INSTANCE.load(className);
testContext.addError(
!foundClass.isPresent(),
"Please insure Guice class '{}' is in the classpath",
className
);
}
代码示例来源:origin: org.testifyproject.junit4/spring-system-test
@Override
public void verify(TestContext testContext) {
String className = "org.springframework.web.WebApplicationInitializer";
Optional<Class> foundClass = ReflectionUtil.INSTANCE.load(className);
testContext.addError(
!foundClass.isPresent(),
"Please insure Spring Web MVC class '{}' is in the classpath",
className
);
}
代码示例来源:origin: org.testifyproject.junit4/hk2-integration-test
@Override
public void verify(TestContext testContext) {
String className = "org.glassfish.hk2.api.ServiceLocator";
Optional<Class> foundClass = ReflectionUtil.INSTANCE.load(className);
testContext.addError(
!foundClass.isPresent(),
"Please insure HK2 class '{}' is in the classpath",
className
);
}
代码示例来源:origin: org.testifyproject.junit4/spring-boot-system-test
@Override
public void verify(TestContext testContext) {
String className = "org.springframework.boot.env.EnvironmentPostProcessor";
Optional<Class> foundClass = ReflectionUtil.INSTANCE.load(className);
testContext.addError(
!foundClass.isPresent(),
"Please insure SpringBoot class '{}' is in the classpath",
className
);
}
内容来源于网络,如有侵权,请联系作者删除!