Back to project page CucumberAndroidGradle.
The source code is released under:
Apache License
If you think the Android project CucumberAndroidGradle listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package cucumber.runtime.android; /*from ww w .j a v a 2 s. c om*/ import cucumber.runtime.snippets.Snippet; import java.util.List; class JavaSnippet implements Snippet { @Override public String arguments(List<Class<?>> argumentTypes) { StringBuilder sb = new StringBuilder(); int n = 1; for (Class<?> argType : argumentTypes) { if (n > 1) { sb.append(", "); } sb.append(argType.getSimpleName()).append(" ").append("arg").append(n++); } return sb.toString(); } @Override public String template() { return "@{0}(\"{1}\")\n" + "public void {2}({3}) throws Throwable '{'\n" + " // {4}\n" + "{5} throw new PendingException();\n" + "'}'\n"; } @Override public String tableHint() { return " // For automatic conversion, change DataTable to List<YourType>\n"; } @Override public String namedGroupStart() { return null; } @Override public String namedGroupEnd() { return null; } @Override public String escapePattern(String pattern) { return pattern.replace("\\", "\\\\").replace("\"", "\\\""); } }