summaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test/java/org
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-08-16 18:00:48 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-08-16 18:00:48 +0200
commitfaa012f7b03c7e62dcd6aefd59bbad0c6b4be351 (patch)
tree412472a6141044b30f0621a781133647bb051b74 /sonar-plugin-api/src/test/java/org
parent5c66652705937dbb24b6728180c63b1c951051d3 (diff)
downloadsonarqube-faa012f7b03c7e62dcd6aefd59bbad0c6b4be351.tar.gz
sonarqube-faa012f7b03c7e62dcd6aefd59bbad0c6b4be351.zip
SONAR-3706 API : remove the deprecated annotation org.sonar.check.Check
Diffstat (limited to 'sonar-plugin-api/src/test/java/org')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java16
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/rules/DeprecatedAnnotatedCheck.java27
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleAnnotationUtilsTest.java6
3 files changed, 0 insertions, 49 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java
index 74877514357..8fe75c018ee 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/AnnotationRuleParserTest.java
@@ -23,7 +23,6 @@ import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.sonar.api.PropertyType;
import org.sonar.api.utils.SonarException;
-import org.sonar.check.IsoCategory;
import org.sonar.check.Priority;
import java.util.Collections;
@@ -126,17 +125,6 @@ public class AnnotationRuleParserTest {
assertThat(rule.getParams()).hasSize(2);
}
- @Test
- public void supportDeprecatedAnnotations() {
- List<Rule> rules = parseAnnotatedClass(Check.class);
- assertThat(rules).hasSize(1);
- Rule rule = rules.get(0);
- assertThat(rule.getKey()).isEqualTo(Check.class.getCanonicalName());
- assertThat(rule.getName()).isEqualTo(Check.class.getCanonicalName());
- assertThat(rule.getDescription()).isEqualTo("Deprecated check");
- assertThat(rule.getSeverity()).isEqualTo(RulePriority.BLOCKER);
- }
-
private List<Rule> parseAnnotatedClass(Class annotatedClass) {
return new AnnotationRuleParser().parse("repo", Collections.singleton(annotatedClass));
}
@@ -178,8 +166,4 @@ public class AnnotationRuleParserTest {
@org.sonar.check.RuleProperty(description = "text", defaultValue = "Long text", type = "INVALID")
public String property;
}
-
- @org.sonar.check.Check(description = "Deprecated check", priority = Priority.BLOCKER, isoCategory = IsoCategory.Maintainability)
- static class Check {
- }
}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/DeprecatedAnnotatedCheck.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/DeprecatedAnnotatedCheck.java
deleted file mode 100644
index 17fd2b7a707..00000000000
--- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/DeprecatedAnnotatedCheck.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Sonar, open source software quality management tool.
- * Copyright (C) 2008-2012 SonarSource
- * mailto:contact AT sonarsource DOT com
- *
- * Sonar is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * Sonar is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with Sonar; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
- */
-package org.sonar.api.rules;
-
-import org.sonar.check.Check;
-import org.sonar.check.IsoCategory;
-
-@Check(title ="Annotated Check", description = "Description", isoCategory = IsoCategory.Reliability)
-public class DeprecatedAnnotatedCheck {
-}
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleAnnotationUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleAnnotationUtilsTest.java
index e20de021e7f..aa07c80f242 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleAnnotationUtilsTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleAnnotationUtilsTest.java
@@ -33,12 +33,6 @@ public class RuleAnnotationUtilsTest {
}
@Test
- public void shouldGetKeyFromDeprecatedCheckAnnotation() {
- String key = RuleAnnotationUtils.getRuleKey(DeprecatedAnnotatedCheck.class);
- assertThat(key, is(DeprecatedAnnotatedCheck.class.getName()));
- }
-
- @Test
public void shouldGetKey() {
String key = RuleAnnotationUtils.getRuleKey(AnnotatedCheckWithParameters.class);
assertThat(key, is("overridden_key"));