IntelliJ-黄瓜步骤定义案例 [英] IntelliJ - Cucumber step definition case
问题描述
自从我升级到IntelliJ 15.0.3的最新社区版本以来,每当我使用 alt + Enter
从功能定义文件自动生成步骤定义时,它都会创建
Ever since I upgraded to latest community edition of IntelliJ 15.0.3, whenever I auto generate a step definition from the feature definition file using alt + enter
, it creates the method in camel case rather than usual style with underscores.
例如它曾经是这样生成的
For e.g. it used to be generated like this
@When("Cucumber is awesome")
public void cucumber_is_awesome() {}
但是现在它以通常的驼色生成:
But now it generates in usual camelCase convention:
@When("Cucumber is awesome")
public void cucumberIsAwesome() {}
有什么方法可以将此设置更改回第一种样式?
Is there any way to change this setting back to the first style?
谢谢
推荐答案
您可以做的就是检查
运行->编辑配置
Run -> Edit Configuration
然后转到黄瓜配置。在程序参数中检查
then go to the cucumber config. Within the Program Arguments check if
-片段驼色
--snippets camelcase
存在并将其取出。那应该使它再次显示在蛇壳中。希望有帮助:-)
is present and take it out. that should make it show it in snake casing again. Hope that helps :-)
这篇关于IntelliJ-黄瓜步骤定义案例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!