diff options
author | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2012-09-10 18:23:14 +0200 |
---|---|---|
committer | Fabrice Bellingard <fabrice.bellingard@sonarsource.com> | 2012-09-11 09:18:23 +0200 |
commit | 6861dd5abd3ccb2e53344ecf6b134f41ecc14107 (patch) | |
tree | 22346b7c0b6872ba90ef7c0179f37987daeef606 /src/test/java/org/sonar | |
parent | ae836cf7d7df1047c6c7e0d7d3bb4355275286f1 (diff) | |
download | sonar-scanner-cli-6861dd5abd3ccb2e53344ecf6b134f41ecc14107.tar.gz sonar-scanner-cli-6861dd5abd3ccb2e53344ecf6b134f41ecc14107.zip |
SONARPLUGINS-2202 Refactor package names to have clearer API
Diffstat (limited to 'src/test/java/org/sonar')
-rw-r--r-- | src/test/java/org/sonar/runner/RunnerTest.java | 5 | ||||
-rw-r--r-- | src/test/java/org/sonar/runner/internal/MainTest.java (renamed from src/test/java/org/sonar/runner/MainTest.java) | 17 | ||||
-rw-r--r-- | src/test/java/org/sonar/runner/internal/batch/LauncherTest.java (renamed from src/test/java/org/sonar/runner/model/LauncherTest.java) | 3 | ||||
-rw-r--r-- | src/test/java/org/sonar/runner/internal/batch/SonarProjectBuilderTest.java (renamed from src/test/java/org/sonar/runner/model/SonarProjectBuilderTest.java) | 6 | ||||
-rw-r--r-- | src/test/java/org/sonar/runner/internal/bootstrapper/BootstrapClassLoaderTest.java (renamed from src/test/java/org/sonar/runner/bootstrapper/BootstrapClassLoaderTest.java) | 4 | ||||
-rw-r--r-- | src/test/java/org/sonar/runner/internal/bootstrapper/BootstrapperTest.java (renamed from src/test/java/org/sonar/runner/bootstrapper/BootstrapperTest.java) | 4 |
6 files changed, 24 insertions, 15 deletions
diff --git a/src/test/java/org/sonar/runner/RunnerTest.java b/src/test/java/org/sonar/runner/RunnerTest.java index 51d3af2..1e61b1c 100644 --- a/src/test/java/org/sonar/runner/RunnerTest.java +++ b/src/test/java/org/sonar/runner/RunnerTest.java @@ -19,11 +19,12 @@ */ package org.sonar.runner; +import org.sonar.runner.internal.bootstrapper.BootstrapException; +import org.sonar.runner.internal.bootstrapper.Bootstrapper; + import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.sonar.runner.bootstrapper.BootstrapException; -import org.sonar.runner.bootstrapper.Bootstrapper; import org.sonar.test.TestUtils; import java.io.File; diff --git a/src/test/java/org/sonar/runner/MainTest.java b/src/test/java/org/sonar/runner/internal/MainTest.java index 3696091..037d1f3 100644 --- a/src/test/java/org/sonar/runner/MainTest.java +++ b/src/test/java/org/sonar/runner/internal/MainTest.java @@ -18,9 +18,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner; +package org.sonar.runner.internal; + +import org.sonar.runner.internal.Main; import org.junit.Test; +import org.sonar.runner.Runner; import java.io.File; import java.util.Properties; @@ -39,7 +42,7 @@ public class MainTest { @Test public void shouldParseArguments() { - Properties props = Main.parseArguments(new String[] { "-D", "foo=bar", "--define", "hello=world", "-Dboolean" }); + Properties props = Main.parseArguments(new String[] {"-D", "foo=bar", "--define", "hello=world", "-Dboolean"}); assertThat(props.size(), is(3)); assertThat(props.getProperty("foo"), is("bar")); assertThat(props.getProperty("hello"), is("world")); @@ -48,7 +51,7 @@ public class MainTest { @Test public void shouldEnableDebugMode() { - Properties props = Main.parseArguments(new String[] { "-X" }); + Properties props = Main.parseArguments(new String[] {"-X"}); assertThat(props.getProperty(Runner.PROPERTY_VERBOSE), is("true")); } @@ -60,7 +63,7 @@ public class MainTest { @Test public void shouldLoadRunnerSettingsByHome() throws Exception { - File home = new File(getClass().getResource("/org/sonar/runner/MainTest/shouldLoadRunnerSettingsByHome/").toURI()); + File home = new File(getClass().getResource("/org/sonar/runner/internal/bootstrapper/MainTest/shouldLoadRunnerSettingsByHome/").toURI()); Properties args = new Properties(); args.setProperty("runner.home", home.getCanonicalPath()); @@ -79,7 +82,7 @@ public class MainTest { @Test public void shouldLoadRunnerSettingsByDirectPath() throws Exception { - File settings = new File(getClass().getResource("/org/sonar/runner/MainTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties").toURI()); + File settings = new File(getClass().getResource("/org/sonar/runner/internal/bootstrapper/MainTest/shouldLoadRunnerSettingsByDirectPath/other-conf.properties").toURI()); Properties args = new Properties(); args.setProperty("runner.settings", settings.getCanonicalPath()); Properties props = Main.loadRunnerProperties(args); @@ -89,8 +92,8 @@ public class MainTest { @Test public void shouldLoadCompleteConfiguration() throws Exception { - File runnerHome = new File(getClass().getResource("/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/runner").toURI()); - File projectHome = new File(getClass().getResource("/org/sonar/runner/MainTest/shouldLoadCompleteConfiguration/project").toURI()); + File runnerHome = new File(getClass().getResource("/org/sonar/runner/internal/bootstrapper/MainTest/shouldLoadCompleteConfiguration/runner").toURI()); + File projectHome = new File(getClass().getResource("/org/sonar/runner/internal/bootstrapper/MainTest/shouldLoadCompleteConfiguration/project").toURI()); Properties props = Main.loadProperties(new String[] { "-D", "runner.home=" + runnerHome.getCanonicalPath(), "-D", "project.home=" + projectHome.getCanonicalPath() diff --git a/src/test/java/org/sonar/runner/model/LauncherTest.java b/src/test/java/org/sonar/runner/internal/batch/LauncherTest.java index 33a7ebf..489b005 100644 --- a/src/test/java/org/sonar/runner/model/LauncherTest.java +++ b/src/test/java/org/sonar/runner/internal/batch/LauncherTest.java @@ -17,7 +17,8 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.model; +package org.sonar.runner.internal.batch; + import org.apache.commons.configuration.BaseConfiguration; import org.apache.commons.configuration.Configuration; diff --git a/src/test/java/org/sonar/runner/model/SonarProjectBuilderTest.java b/src/test/java/org/sonar/runner/internal/batch/SonarProjectBuilderTest.java index fd2eeea..593323c 100644 --- a/src/test/java/org/sonar/runner/model/SonarProjectBuilderTest.java +++ b/src/test/java/org/sonar/runner/internal/batch/SonarProjectBuilderTest.java @@ -17,7 +17,7 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.model; +package org.sonar.runner.internal.batch; import org.apache.commons.io.IOUtils; import org.junit.Rule; @@ -238,12 +238,12 @@ public class SonarProjectBuilderTest { @Test public void shouldGetRelativeFile() { assertThat(SonarProjectBuilder.getFileFromPath("shouldGetFile/foo.properties", TestUtils.getResource(this.getClass(), "/"))) - .isEqualTo(TestUtils.getResource("org/sonar/runner/model/SonarProjectBuilderTest/shouldGetFile/foo.properties")); + .isEqualTo(TestUtils.getResource(this.getClass(), "shouldGetFile/foo.properties")); } @Test public void shouldGetAbsoluteFile() { - File file = TestUtils.getResource("org/sonar/runner/model/SonarProjectBuilderTest/shouldGetFile/foo.properties"); + File file = TestUtils.getResource(this.getClass(), "shouldGetFile/foo.properties"); assertThat(SonarProjectBuilder.getFileFromPath(file.getAbsolutePath(), TestUtils.getResource(this.getClass(), "/"))) .isEqualTo(file); diff --git a/src/test/java/org/sonar/runner/bootstrapper/BootstrapClassLoaderTest.java b/src/test/java/org/sonar/runner/internal/bootstrapper/BootstrapClassLoaderTest.java index 17ddce5..9510e32 100644 --- a/src/test/java/org/sonar/runner/bootstrapper/BootstrapClassLoaderTest.java +++ b/src/test/java/org/sonar/runner/internal/bootstrapper/BootstrapClassLoaderTest.java @@ -17,7 +17,9 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.bootstrapper; +package org.sonar.runner.internal.bootstrapper; + +import org.sonar.runner.internal.bootstrapper.BootstrapClassLoader; import org.junit.Rule; import org.junit.Test; diff --git a/src/test/java/org/sonar/runner/bootstrapper/BootstrapperTest.java b/src/test/java/org/sonar/runner/internal/bootstrapper/BootstrapperTest.java index b09afae..e153695 100644 --- a/src/test/java/org/sonar/runner/bootstrapper/BootstrapperTest.java +++ b/src/test/java/org/sonar/runner/internal/bootstrapper/BootstrapperTest.java @@ -17,7 +17,9 @@ * License along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 */ -package org.sonar.runner.bootstrapper; +package org.sonar.runner.internal.bootstrapper; + +import org.sonar.runner.internal.bootstrapper.Bootstrapper; import org.junit.Test; |