diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-02-13 15:33:58 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-02-13 15:36:04 +0100 |
commit | 695fca2e7412295fc041ff8d61cf727d35d05ce9 (patch) | |
tree | 2f8523fb5c343e78f948a0315a1f9f330c075a92 /sonar-plugin-api | |
parent | b6e7cc0ac63191ebcd85a3ef77fb18c224280195 (diff) | |
download | sonarqube-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.java | 2 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/test/TestCaseTest.java | 33 |
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(); + } +} |