本文整理汇总了Java中gherkin.formatter.Formatter类的典型用法代码示例。如果您正苦于以下问题:Java Formatter类的具体用法?Java Formatter怎么用?Java Formatter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Formatter类属于gherkin.formatter包,在下文中一共展示了Formatter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: tearDownClass
import gherkin.formatter.Formatter; //导入依赖的package包/类
@AfterClass(alwaysRun = true)
public void tearDownClass() throws Exception {
RuntimeOptions ro = runtimeOptions.getRuntimeOptions();
Formatter formatter = ro.formatter(runtimeOptions.getClassLoader());
formatter.done();
formatter.close();
}
开发者ID:intuit,项目名称:karate,代码行数:8,代码来源:KarateRunner.java
示例2: createSingleRerunFile
import gherkin.formatter.Formatter; //导入依赖的package包/类
private Path createSingleRerunFile(List<CucumberFeature> rerunFeatures) throws IOException {
Path rerunPath = Files.createTempFile("parallelCukes", ".rerun");
rerunPath.toFile().deleteOnExit();
PluginFactory pluginFactory = new PluginFactory();
Object rerunFormatter = pluginFactory.create("rerun:" + rerunPath);
RerunFileBuilder rerunFileBuilder = new RerunFileBuilder((Formatter) rerunFormatter, (Reporter) rerunFormatter);
for (CucumberFeature feature : rerunFeatures)
rerunFileBuilder.addFeature(feature);
rerunFileBuilder.close();
return rerunPath;
}
开发者ID:djb61,项目名称:parallel-cucumber-jvm,代码行数:12,代码来源:FeatureSplitter.java
示例3: RerunFileBuilder
import gherkin.formatter.Formatter; //导入依赖的package包/类
public RerunFileBuilder(Formatter formatter, Reporter reporter) {
/*
* Both of these should point to a single concrete formatter instance
* This is passed twice so we can access both of its interfaces methods
* All the cucumber concrete formatters are non-public so can't be used
* directly
*/
this.formatter = formatter;
this.reporter = reporter;
}
开发者ID:djb61,项目名称:parallel-cucumber-jvm,代码行数:11,代码来源:RerunFileBuilder.java
示例4: RestJUnitReporter
import gherkin.formatter.Formatter; //导入依赖的package包/类
public RestJUnitReporter(Reporter reporter, Formatter formatter, boolean strict,
RestRuntime runtime) {
super(reporter, formatter, strict);
this.runtime = runtime;
results = new HashMap<String, String>();
features = new HashMap<String, CucumberFeature>();
}
开发者ID:LiamHayes1,项目名称:rest-cucumber,代码行数:8,代码来源:RestJUnitReporter.java
示例5: aroundAddIgnoreTagPointcut
import gherkin.formatter.Formatter; //导入依赖的package包/类
/**
* @param pjp ProceedingJoinPoint
* @param formatter formatter
* @param reporter reporter
* @param runtime runtime
* @throws Throwable exception
*/
@Around(value = "addIgnoreTagPointcutScenario(formatter, reporter, runtime)")
public void aroundAddIgnoreTagPointcut(ProceedingJoinPoint pjp, Formatter formatter, Reporter reporter,
Runtime runtime) throws Throwable {
CucumberScenario scen = (CucumberScenario) pjp.getThis();
Scenario scenario = (Scenario) scen.getGherkinModel();
Class<?> sc = scen.getClass();
Method tt = sc.getSuperclass().getDeclaredMethod("tagsAndInheritedTags");
tt.setAccessible(true);
Set<Tag> tags = (Set<Tag>) tt.invoke(scen);
List<String> tagList = new ArrayList<>();
String scenarioName = scenario.getName();
tagList = tags.stream().map(Tag::getName).collect(Collectors.toList());
ignoreReasons exitReason = manageTags(tagList, scenarioName);
if (exitReason.equals(NOREASON)) {
logger.error("Scenario '" + scenario.getName() + "' failed due to wrong use of the @ignore tag. ");
}
if ((!(exitReason.equals(NOTIGNORED))) && (!(exitReason.equals(NOREASON)))) {
runtime.buildBackendWorlds(reporter, tags, scenario.getName());
formatter.startOfScenarioLifeCycle(scenario);
formatter.endOfScenarioLifeCycle(scenario);
runtime.disposeBackendWorlds();
} else {
pjp.proceed();
}
}
开发者ID:Stratio,项目名称:bdt,代码行数:38,代码来源:IgnoreTagAspect.java
示例6: replay
import gherkin.formatter.Formatter; //导入依赖的package包/类
public void replay(Formatter formatter) {
feature.replay(formatter);
backgroundWrapper.replay(formatter);
for (ScenarioWrapper scenario : scenarios) {
scenario.replay(formatter);
}
}
开发者ID:seize-the-dave,项目名称:jbehave-to-gherkin,代码行数:8,代码来源:FeatureWrapper.java
示例7: write
import gherkin.formatter.Formatter; //导入依赖的package包/类
public void write(FeatureWrapper gherkin) {
Formatter formatter = new PrettyFormatter(writer, true, false);
gherkin.replay(formatter);
formatter.eof();
formatter.close();
}
开发者ID:seize-the-dave,项目名称:jbehave-to-gherkin,代码行数:8,代码来源:GherkinWriter.java
示例8: replay
import gherkin.formatter.Formatter; //导入依赖的package包/类
public void replay(Formatter formatter) {
scenario.replay(formatter);
scenarioOutline.replay(formatter);
for (Step step : steps) {
step.replay(formatter);
}
examples.replay(formatter);
}
开发者ID:seize-the-dave,项目名称:jbehave-to-gherkin,代码行数:9,代码来源:ScenarioWrapper.java
示例9: nullFormatter
import gherkin.formatter.Formatter; //导入依赖的package包/类
private Formatter nullFormatter() {
return (Formatter) Proxy.newProxyInstance(getClass().getClassLoader(), new Class[]{Formatter.class}, new InvocationHandler() {
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return null;
}
});
}
开发者ID:alexvictoor,项目名称:pitest-cucumber-plugin,代码行数:9,代码来源:ScenarioTestUnit.java
示例10: should_run_scenario_and_call_collector_when_ran
import gherkin.formatter.Formatter; //导入依赖的package包/类
@Test
public void should_run_scenario_and_call_collector_when_ran() {
// given
ScenarioTestUnit testUnit = new ScenarioTestUnit(HideFromJUnit.Concombre.class, scenario);
// when
testUnit.execute(getClass().getClassLoader(), resultCollector);
// then
verify(scenario, times(1)).run(any(Formatter.class), any(Reporter.class), any(Runtime.class));
}
开发者ID:alexvictoor,项目名称:pitest-cucumber-plugin,代码行数:12,代码来源:ScenarioTestUnitTest.java
示例11: result
import gherkin.formatter.Formatter; //导入依赖的package包/类
@Override
public void result(Result arg0) {
Formatter wrapped = threadAwareWrappedFormatter.getWrapped();
if(wrapped instanceof JSONFormatter) {
((JSONFormatter) wrapped).result(arg0);
}
else {
getWrapped().result(arg0);
}
}
开发者ID:gfk-ba,项目名称:senbot,代码行数:11,代码来源:ParameterizedCucumber.java
示例12: ThreadAwareFormatter
import gherkin.formatter.Formatter; //导入依赖的package包/类
private ThreadAwareFormatter(final RuntimeOptions runtimeOptions, final ClassLoader classLoader) {
this.runtimeOptions = runtimeOptions;
this.classLoader = classLoader;
wrapped = new ThreadLocal<Formatter>() {
@Override
protected Formatter initialValue() {
Formatter created = FORMATTER_FACTORY.create("json:target/test-results/result_" + Thread.currentThread().getId() + ".json");
known.add(created);
return created;
// Formatter formatter = runtimeOptions.formatter(classLoader);
// return formatter;
}
};
}
开发者ID:gfk-ba,项目名称:senbot,代码行数:15,代码来源:ParameterizedCucumber.java
示例13: close
import gherkin.formatter.Formatter; //导入依赖的package包/类
@Override
public void close() {
for(Formatter formatter : known) {
formatter.close();
}
}
开发者ID:gfk-ba,项目名称:senbot,代码行数:8,代码来源:ParameterizedCucumber.java
示例14: KarateHtmlReporter
import gherkin.formatter.Formatter; //导入依赖的package包/类
public KarateHtmlReporter(Reporter reporter, Formatter formatter) {
this.reporter = reporter;
this.formatter = formatter;
NUMBER_FORMAT.applyPattern("0.######");
}
开发者ID:intuit,项目名称:karate,代码行数:6,代码来源:KarateHtmlReporter.java
示例15: formatter
import gherkin.formatter.Formatter; //导入依赖的package包/类
public Formatter formatter(ClassLoader classLoader) {
return runtimeOptions.formatter(classLoader);
}
开发者ID:LiamHayes1,项目名称:rest-cucumber,代码行数:4,代码来源:RestRuntimeOptions.java
示例16: addIgnoreTagPointcutScenario
import gherkin.formatter.Formatter; //导入依赖的package包/类
@Pointcut("execution (* cucumber.runtime.model.CucumberScenario.run(..)) && "
+ "args (formatter, reporter, runtime)")
protected void addIgnoreTagPointcutScenario(Formatter formatter, Reporter reporter, Runtime runtime) {
}
开发者ID:Stratio,项目名称:bdt,代码行数:5,代码来源:IgnoreTagAspect.java
示例17: replay
import gherkin.formatter.Formatter; //导入依赖的package包/类
public void replay(Formatter formatter) {
// Do nothing
}
开发者ID:seize-the-dave,项目名称:jbehave-to-gherkin,代码行数:4,代码来源:BackgroundWrapper.java
示例18: getWrapped
import gherkin.formatter.Formatter; //导入依赖的package包/类
public Formatter getWrapped() {
return wrapped.get();
}
开发者ID:gfk-ba,项目名称:senbot,代码行数:4,代码来源:ParameterizedCucumber.java
示例19: done
import gherkin.formatter.Formatter; //导入依赖的package包/类
@Override
public void done() {
for(Formatter formatter : known) {
formatter.done();
}
}
开发者ID:gfk-ba,项目名称:senbot,代码行数:7,代码来源:ParameterizedCucumber.java
示例20: ScenarioTest
import gherkin.formatter.Formatter; //导入依赖的package包/类
public ScenarioTest(CucumberScenario scenario, Formatter formatter, Runtime runtime) {
mScenario = scenario;
mFormatter = formatter;
mRuntime = runtime;
super.setName(scenario.getVisualName());
}
开发者ID:mfellner,项目名称:cucumber-android,代码行数:7,代码来源:CucumberInstrumentationTestRunner.java
注:本文中的gherkin.formatter.Formatter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论