IntelliJ - Cucumber step definition case

青春壹個敷衍的年華 提交于 2019-12-10 13:51:37

问题


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?

Thanks


回答1:


What you can do is check the

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 :-)



来源:https://stackoverflow.com/questions/35646605/intellij-cucumber-step-definition-case

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!