aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-02-13 15:33:58 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2013-02-13 15:36:04 +0100
commit695fca2e7412295fc041ff8d61cf727d35d05ce9 (patch)
tree2f8523fb5c343e78f948a0315a1f9f330c075a92 /sonar-plugin-api
parentb6e7cc0ac63191ebcd85a3ef77fb18c224280195 (diff)
downloadsonarqube-695fca2e7412295fc041ff8d61cf727d35d05ce9.tar.gz
sonarqube-695fca2e7412295fc041ff8d61cf727d35d05ce9.zip
Fix some quality flaws
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java2
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/test/TestCaseTest.java33
2 files changed, 33 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java b/sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java
index 0eb710cb796..90629bae049 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/test/TestPlan.java
@@ -21,8 +21,6 @@ package org.sonar.api.test;
import org.sonar.api.component.Perspective;
-import java.util.List;
-
public interface TestPlan<T extends TestCase> extends Perspective {
Iterable<T> testCases();
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/test/TestCaseTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/test/TestCaseTest.java
new file mode 100644
index 00000000000..5b3c80074b8
--- /dev/null
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/test/TestCaseTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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.test;
+
+import org.junit.Test;
+
+import static org.fest.assertions.Assertions.assertThat;
+
+public class TestCaseTest {
+ @Test
+ public void value_of_status() {
+ assertThat(TestCase.Status.of("OK")).isEqualTo(TestCase.Status.OK);
+ assertThat(TestCase.Status.of("OK")).isEqualTo(TestCase.Status.OK);
+ assertThat(TestCase.Status.of(null)).isNull();
+ }
+}