本文整理汇总了Java中cucumber.runtime.Backend类的典型用法代码示例。如果您正苦于以下问题:Java Backend类的具体用法?Java Backend怎么用?Java Backend使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Backend类属于cucumber.runtime包,在下文中一共展示了Backend类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: closeWebDriverPool
import cucumber.runtime.Backend; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private void closeWebDriverPool() {
try {
Runtime runtime = (Runtime) FieldUtils.readField(this, "runtime", true);
Collection<? extends Backend> backends =
(Collection<? extends Backend>) FieldUtils.readField(runtime, "backends", true);
for (Backend backend : backends) {
if (backend instanceof JavaBackend) {
GuiceFactory factory =
(GuiceFactory) FieldUtils.readField(backend, "objectFactory", true);
WebDriverRegistry webDriverRegistry = factory.getInstance(WebDriverRegistry.class);
webDriverRegistry.shutdown();
}
}
} catch (IllegalAccessException e) {
LOG.error("unable to close web driver pool", e);
}
}
开发者ID:Cognifide,项目名称:bobcat,代码行数:19,代码来源:Bobcumber.java
示例2: onCreate
import cucumber.runtime.Backend; //导入依赖的package包/类
@Override
public void onCreate(Bundle arguments) {
Context context = getContext();
Properties properties = new Properties();
String glue = context.getPackageName();
String features = "features";
properties.setProperty("cucumber.options", String.format("-g %s %s", glue, features));
mRuntimeOptions = new RuntimeOptions(properties);
mResourceLoader = new AndroidResourceLoader(context);
List<Backend> backends = new ArrayList<Backend>();
backends.add(new AndroidBackend(this));
mRuntime = new Runtime(mResourceLoader, getLoader(), backends, mRuntimeOptions);
mFormatter = new AndroidFormatter(TAG);
mRuntimeOptions.formatters.clear();
mRuntimeOptions.formatters.add(mFormatter);
super.onCreate(arguments);
}
开发者ID:mfellner,项目名称:cucumber-android,代码行数:22,代码来源:CucumberInstrumentationTestRunner.java
示例3: setUp
import cucumber.runtime.Backend; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
when(i18n.keywords(GIVEN)).thenReturn(Arrays.asList(GIVEN));
when(scenario.getId()).thenReturn(SCENARIO_ID);
List<Backend> backends = Arrays.asList(backend);
threadLoggedRuntime = new ThreadLoggedRuntime(resourceLoader, classLoader, backends, runtimeOptions, threadExecutionRecorder);
}
开发者ID:djb61,项目名称:parallel-cucumber-jvm,代码行数:10,代码来源:ThreadLoggedRuntimeTest.java
示例4: getBackends
import cucumber.runtime.Backend; //导入依赖的package包/类
@Override
public List<Backend> getBackends() {
wasInvoked = true;
ResourceLoader resourceLoader = new MultiLoader(Thread.currentThread().getContextClassLoader());
Backend backend = new JavaBackend(resourceLoader);
return Arrays.asList(backend);
}
开发者ID:djb61,项目名称:parallel-cucumber-jvm,代码行数:8,代码来源:FakeCucumberBackendFactory.java
示例5: allBackends
import cucumber.runtime.Backend; //导入依赖的package包/类
protected List<Backend> allBackends() throws IOException {
ArrayList<RemoteBackend> remoteBackends = Lists.newArrayList();
for (RemoteBackendProperties remoteBackendProperties : cucumberProperties.getRemoteBackends()) {
remoteBackends.add(remoteBackendProperties.createRemoteBackend());
}
Backend miniumBackend = rhinoEngine.runWithContext(rhinoEngine.new RhinoCallable<Backend, IOException>() {
@Override
protected Backend doCall(Context cx, Scriptable scope) throws IOException {
return new MiniumBackend(resourceLoader, cx, scope);
}
});
return ImmutableList.<Backend> builder().add(miniumBackend).addAll(remoteBackends).build();
}
开发者ID:viltgroup,项目名称:minium,代码行数:14,代码来源:MiniumProfileRunner.java
示例6: ThreadLoggedRuntime
import cucumber.runtime.Backend; //导入依赖的package包/类
public ThreadLoggedRuntime(ResourceLoader resourceLoader, ClassLoader classLoader,
Collection<? extends Backend> backends, RuntimeOptions runtimeOptions,
ThreadExecutionRecorder threadExecutionRecorder) {
super(resourceLoader, classLoader, backends, runtimeOptions);
this.threadExecutionRecorder = threadExecutionRecorder;
}
开发者ID:djb61,项目名称:parallel-cucumber-jvm,代码行数:7,代码来源:ThreadLoggedRuntime.java
示例7: register
import cucumber.runtime.Backend; //导入依赖的package包/类
public BackendRegistry register(String name, Backend backend) {
Preconditions.checkState(!backends.containsKey(name), "Backend with name %s already registered", name);
backends.put(name, backend);
return this;
}
开发者ID:viltgroup,项目名称:minium,代码行数:6,代码来源:BackendRegistry.java
示例8: getAll
import cucumber.runtime.Backend; //导入依赖的package包/类
public Map<String, Backend> getAll() {
return new HashMap<String, Backend>(backends);
}
开发者ID:viltgroup,项目名称:minium,代码行数:4,代码来源:BackendRegistry.java
示例9: BackendContext
import cucumber.runtime.Backend; //导入依赖的package包/类
public BackendContext(String backendName, Backend backend) {
this.backendName = backendName;
this.backend = backend;
}
开发者ID:viltgroup,项目名称:minium,代码行数:5,代码来源:BackendContext.java
示例10: CucumberRestController
import cucumber.runtime.Backend; //导入依赖的package包/类
public CucumberRestController(Backend backend) {
this(new BackendRegistry().register(DEFAULT_BACKEND, backend));
}
开发者ID:viltgroup,项目名称:minium,代码行数:4,代码来源:CucumberRestController.java
示例11: backendMock
import cucumber.runtime.Backend; //导入依赖的package包/类
@Bean(name = "mockedBackend")
public Backend backendMock() {
return mock(Backend.class);
}
开发者ID:viltgroup,项目名称:minium,代码行数:5,代码来源:MockRestConfig.java
示例12: backend
import cucumber.runtime.Backend; //导入依赖的package包/类
@Bean
public Backend backend() {
return new JavaBackend(resourceLoader());
}
开发者ID:viltgroup,项目名称:minium,代码行数:5,代码来源:RemoteBackendTest.java
示例13: withBackends
import cucumber.runtime.Backend; //导入依赖的package包/类
public RuntimeBuilder withBackends(Backend ... backends) {
return withBackends(Arrays.asList(backends));
}
开发者ID:viltgroup,项目名称:minium,代码行数:4,代码来源:RuntimeBuilder.java
示例14: getBackends
import cucumber.runtime.Backend; //导入依赖的package包/类
List<Backend> getBackends();
开发者ID:djb61,项目名称:parallel-cucumber-jvm,代码行数:2,代码来源:CucumberBackendFactory.java
注:本文中的cucumber.runtime.Backend类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论