Skip to content

Commit

Permalink
Merge pull request #7 from MrTimeey/test_method
Browse files Browse the repository at this point in the history
Remove public modifier from test methods
  • Loading branch information
Tim Siegler authored Nov 23, 2020
2 parents 5a80f7f + fea1260 commit 0b25dc1
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Abbreviation: __test__
Template text:
```
@org.junit.jupiter.api.Test
public void test$Function$() throws java.io.IOException {
void test$Function$() throws java.io.IOException {
org.assertj.core.api.Assertions.assertThat("").isEqualTo("false");
}
```
Expand All @@ -43,7 +43,7 @@ Template text:
private org.springframework.test.web.servlet.MockMvc mockMvc;
@org.junit.jupiter.api.Test
public void test$Function$() throws java.lang.Exception {
void test$Function$() throws java.lang.Exception {
org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder request = org.springframework.test.web.servlet.request.MockMvcRequestBuilders
.get("")
.contentType(org.springframework.http.MediaType.APPLICATION_JSON);
Expand Down
4 changes: 2 additions & 2 deletions custom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<option name="JAVA_COMMENT" value="false" />
</context>
</template>
<template name="test" value="@org.junit.jupiter.api.Test&#10;public void test$Function$() throws java.io.IOException {&#10; org.assertj.core.api.Assertions.assertThat(&quot;&quot;).isEqualTo(&quot;false&quot;);&#10;}" description="Creates JUnit test" toReformat="true" toShortenFQNames="true" useStaticImport="true">
<template name="test" value="@org.junit.jupiter.api.Test&#10;void test$Function$() throws java.lang.Exception {&#10; org.assertj.core.api.Assertions.assertThat(&quot;&quot;).isEqualTo(&quot;false&quot;);&#10;}" description="Creates JUnit test" toReformat="true" toShortenFQNames="true" useStaticImport="true">
<variable name="Function" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_CODE" value="true" />
Expand All @@ -19,7 +19,7 @@
<option name="JAVA_DECLARATION" value="true" />
</context>
</template>
<template name="testmvc" value="@org.springframework.beans.factory.annotation.Autowired&#10;private org.springframework.test.web.servlet.MockMvc mockMvc;&#10;&#10;@org.junit.jupiter.api.Test&#10;public void test$Function$() throws java.lang.Exception {&#10; org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder request = org.springframework.test.web.servlet.request.MockMvcRequestBuilders&#10; .get(&quot;&quot;)&#10; .contentType(org.springframework.http.MediaType.APPLICATION_JSON);&#10;&#10; mockMvc.perform(request)&#10; .andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status().isOk())&#10; .andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.content().contentType(org.springframework.http.MediaType.APPLICATION_JSON))&#10; .andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath(&quot;&quot;, org.hamcrest.Matchers.is(&quot;&quot;)));&#10;}" description="Creates JUnit test method with MockMvc" toReformat="true" toShortenFQNames="true">
<template name="testmvc" value="@org.springframework.beans.factory.annotation.Autowired&#10;private org.springframework.test.web.servlet.MockMvc mockMvc;&#10;&#10;@org.junit.jupiter.api.Test&#10;void test$Function$() throws java.lang.Exception {&#10; org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder request = org.springframework.test.web.servlet.request.MockMvcRequestBuilders&#10; .get(&quot;&quot;)&#10; .contentType(org.springframework.http.MediaType.APPLICATION_JSON);&#10;&#10; mockMvc.perform(request)&#10; .andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.status().isOk())&#10; .andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.content().contentType(org.springframework.http.MediaType.APPLICATION_JSON))&#10; .andExpect(org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath(&quot;&quot;, org.hamcrest.Matchers.is(&quot;&quot;)));&#10;}" description="Creates JUnit test method with MockMvc" toReformat="true" toShortenFQNames="true">
<variable name="Function" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_CODE" value="true" />
Expand Down
Binary file modified settings.zip
Binary file not shown.
Binary file modified test_method/example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test_mvc_method/example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0b25dc1

Please sign in to comment.