From 42f17286694370e73b48db38cbc3b328ff10764c Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 7 Dec 2012 15:45:24 +0100 Subject: Fix quality flaws --- plugins/sonar-l10n-en-plugin/pom.xml | 15 ++++++++++- .../org/sonar/plugins/l10n/EnglishPackPlugin.java | 4 +-- .../sonar/plugins/l10n/EnglishPackPluginTest.java | 31 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 4 deletions(-) create mode 100644 plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java (limited to 'plugins') diff --git a/plugins/sonar-l10n-en-plugin/pom.xml b/plugins/sonar-l10n-en-plugin/pom.xml index 33651911c6e..43d7967b0f6 100644 --- a/plugins/sonar-l10n-en-plugin/pom.xml +++ b/plugins/sonar-l10n-en-plugin/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 @@ -20,6 +21,18 @@ sonar-plugin-api provided + + + junit + junit + test + + + org.easytesting + fest-assert + test + + diff --git a/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java b/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java index 19e8bb2262e..787788fc8ad 100644 --- a/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java +++ b/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/EnglishPackPlugin.java @@ -19,8 +19,6 @@ */ package org.sonar.plugins.l10n; -import org.sonar.api.Extension; - import org.sonar.api.SonarPlugin; import java.util.Collections; @@ -28,7 +26,7 @@ import java.util.List; public final class EnglishPackPlugin extends SonarPlugin { - public List> getExtensions() { + public List getExtensions() { return Collections.emptyList(); } } diff --git a/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java b/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java new file mode 100644 index 00000000000..6987233f554 --- /dev/null +++ b/plugins/sonar-l10n-en-plugin/src/test/java/org/sonar/plugins/l10n/EnglishPackPluginTest.java @@ -0,0 +1,31 @@ +/* + * 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.plugins.l10n; + +import org.junit.Test; + +import static org.fest.assertions.Assertions.assertThat; + +public class EnglishPackPluginTest { + @Test + public void no_extensions() { + assertThat(new EnglishPackPlugin().getExtensions()).isEmpty(); + } +} -- cgit v1.2.3