Skip to content

Commit

Permalink
tests(java): fix groovy tests (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed Jul 24, 2020
1 parent c6ecbb0 commit cc5d119
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
14 changes: 14 additions & 0 deletions playground/test.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,17 @@ protected Collection<ScriptRequest> createSecureScriptRequests(Collection<Script
* @throws IndexOutOfBoundsException
*/
public Collection<ScriptRequest> UkrainianAnalyzerProvider(IndexSettings indexSettings, Environment env, String name, Settings settings) throws IOException, IndexOutOfBoundsException {}

/**
* [TODO:description]
*
* @param p1 [TODO:description]
* @param p2 [TODO:description]
* @param params [TODO:description]
*
* @return [TODO:description]
*
* @throws IOException
* @throws IndexOutOfBoundsException
*/
private static MstRelation MyParameterizedMethod(String p1, int p2, Boolean ...params) throws IOException, IndexOutOfBoundsException {}
14 changes: 10 additions & 4 deletions test/filetypes/groovy/class-methods.vader
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ Given groovy (method without parameters):
Do (trigger doge):
:2\<CR>
\<C-d>
:8\<CR>
:9\<CR>
\<C-d>

Expect groovy (method with 'TODO' and a @return tag):
class Test {
/**
* [TODO:description]
*
* @return [TODO:description]
*/
List<Element> createSortedList() {}
Expand Down Expand Up @@ -55,15 +56,15 @@ Expect groovy (method with 'TODO' and a description):
# ==============================================================================
Given groovy (methods with parameters):
class Test {
private static MstRelation MyParameterizedMethod(String p1, int p2, Boolean ...params) {}
private static MstRelation MyParameterizedMethod(String p1, int p2, Boolean ...params) throws IOException, IndexOutOfBoundsException {}

ListResultBean<MstRelation> MyParameterizedMethod(String p1, int p2, Boolean... params) {}
}

Do (trigger doge):
:2\<CR>
\<C-d>
:12\<CR>
:16\<CR>
\<C-d>

Expect groovy (generated comments with @param and @return tags):
Expand All @@ -74,16 +75,21 @@ Expect groovy (generated comments with @param and @return tags):
* @param p1 [TODO:description]
* @param p2 [TODO:description]
* @param params [TODO:description]
*
* @return [TODO:description]
*
* @throws IOException
* @throws IndexOutOfBoundsException
*/
private static MstRelation MyParameterizedMethod(String p1, int p2, Boolean ...params) {}
private static MstRelation MyParameterizedMethod(String p1, int p2, Boolean ...params) throws IOException, IndexOutOfBoundsException {}

/**
* [TODO:description]
*
* @param p1 [TODO:description]
* @param p2 [TODO:description]
* @param params [TODO:description]
*
* @return [TODO:description]
*/
ListResultBean<MstRelation> MyParameterizedMethod(String p1, int p2, Boolean... params) {}
Expand Down

0 comments on commit cc5d119

Please sign in to comment.