org.testifyproject.TestContext.getTestConfigurer()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.5k)|赞(0)|评价(0)|浏览(66)

本文整理了Java中org.testifyproject.TestContext.getTestConfigurer()方法的一些代码示例,展示了TestContext.getTestConfigurer()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TestContext.getTestConfigurer()方法的具体详情如下:
包路径:org.testifyproject.TestContext
类名称:TestContext
方法名:getTestConfigurer

TestContext.getTestConfigurer介绍

[英]Get the test configurer associated with the test context.
[中]获取与测试上下文关联的测试配置程序。

代码示例

代码示例来源:origin: org.testifyproject.di/di-jersey

@Override
public InjectionManager create(TestContext testContext) {
  TestConfigurer testConfigurer = testContext.getTestConfigurer();
  InjectionManager injectionManager = Injections.createInjectionManager();
  return testConfigurer.configure(testContext, injectionManager);
}

代码示例来源:origin: org.testifyproject.junit4/spring-boot-system-test

public EmbeddedServletContainerFactory getEmbeddedServletContainerFactory(
    @SuperCall Callable<EmbeddedServletContainerFactory> zuper) throws Exception {
  EmbeddedServletContainerFactory containerFactory = zuper.call();
  TestContextHolder.INSTANCE.command(testContext -> {
    ConfigurableEmbeddedServletContainer servletContainer =
        (ConfigurableEmbeddedServletContainer) containerFactory;
    servletContainer.setPort(0);
    TestConfigurer testConfigurer = testContext.getTestConfigurer();
    testConfigurer.configure(testContext, servletContainer);
  });
  return containerFactory;
}

代码示例来源:origin: org.testifyproject.junit4/spring-boot-system-test

protected void prepareEmbeddedWebApplicationContext(@SuperCall Callable<Void> zuper,
    @Argument(0) ServletContext servletContext) throws Exception {
  TestContextHolder.INSTANCE.command(testContext -> {
    TestConfigurer testConfigurer = testContext.getTestConfigurer();
    testConfigurer.configure(testContext, servletContext);
  });
  zuper.call();
}

代码示例来源:origin: org.testifyproject.di/di-hk2

@Override
public ServiceLocator create(TestContext testContext) {
  TestConfigurer testConfigurer = testContext.getTestConfigurer();
  ServiceLocatorFactory locatorFactory = ServiceLocatorFactory.getInstance();
  ServiceLocator serviceLocator = locatorFactory.create(testContext.getName());
  return testConfigurer.configure(testContext, serviceLocator);
}

代码示例来源:origin: org.testifyproject.level/system

@Override
public void start(TestContext testContext) {
  TestConfigurer testConfigurer = testContext.getTestConfigurer();
  TestDescriptor testDescriptor = testContext.getTestDescriptor();
  Optional<SutDescriptor> foundSutDescriptor = testContext.getSutDescriptor();

代码示例来源:origin: org.testifyproject.level/unit

@Override
public void start(TestContext testContext) {
  Object testInstance = testContext.getTestInstance();
  TestConfigurer testConfigurer = testContext.getTestConfigurer();
  TestDescriptor testDescriptor = testContext.getTestDescriptor();
  Collection<Class<? extends Annotation>> guidelines = testDescriptor.getGuidelines();

代码示例来源:origin: org.testifyproject.level/integration

@Override
public void start(TestContext testContext) {
  Object testInstance = testContext.getTestInstance();
  TestConfigurer testConfigurer = testContext.getTestConfigurer();
  Optional<SutDescriptor> foundSutDescriptor = testContext.getSutDescriptor();
  TestDescriptor testDescriptor = testContext.getTestDescriptor();

代码示例来源:origin: org.testifyproject.di/di-spring

TestConfigurer testConfigurer = testContext.getTestConfigurer();
ConfigurableApplicationContext configuredApplicationContext =
    testConfigurer.configure(testContext, applicationContext);

代码示例来源:origin: org.testifyproject.junit4/spring-system-test

TestConfigurer testConfigurer = testContext.getTestConfigurer();
ConfigurableApplicationContext configuredApplicationContext =
    testConfigurer.configure(testContext, configuredContext);

相关文章