From: Godin Date: Sun, 28 Nov 2010 22:29:03 +0000 (+0000) Subject: SONAR-2015: Improve unit test X-Git-Tag: 2.6~503 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f172395d65fbe713f9ee89250b936e349dd121d1;p=sonarqube.git SONAR-2015: Improve unit test --- diff --git a/plugins/sonar-squid-java-plugin/test-resources/rules/UndocumentedApi.java b/plugins/sonar-squid-java-plugin/test-resources/rules/UndocumentedApi.java index 4f075dfbf36..729a0a7fe89 100644 --- a/plugins/sonar-squid-java-plugin/test-resources/rules/UndocumentedApi.java +++ b/plugins/sonar-squid-java-plugin/test-resources/rules/UndocumentedApi.java @@ -7,9 +7,22 @@ class UndocumentedApi { public UndocumentedApi() { // no violation, because empty constructor } + public UndocumentedApi(String key) { // violation + this.key = key; + } + public void run() { // violation } + public interface InnerUndocumentedInterface { // violation + } + + /** + * no violation, because documented + */ + public void run2() { + } + public void setKey(String key) { // no violation, because setter this.key = key; } @@ -22,4 +35,5 @@ class UndocumentedApi { public String toString() { // no violation, because method with override annotation return key; } + }