]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2015: Improve unit test
authorGodin <mandrikov@gmail.com>
Sun, 28 Nov 2010 22:29:03 +0000 (22:29 +0000)
committerGodin <mandrikov@gmail.com>
Sun, 28 Nov 2010 22:29:03 +0000 (22:29 +0000)
plugins/sonar-squid-java-plugin/test-resources/rules/UndocumentedApi.java

index 4f075dfbf363dd6f7f552e7a696f845c8ca075bd..729a0a7fe8961c6f119ecf24e4f421d42816d500 100644 (file)
@@ -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;
   }
+
 }