added Hudson.getDescriptorByType() to simplify the retrieval of the descriptor instance. Fixed test cases.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@15656 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2009-02-24 18:32:42 +00:00
1 parent 5e5bc93b78
commit af21daf8d9
9 files changed
+52 -14

No files matched your search

@@ -299,7 +299,7 @@ public abstract class HudsonTestCase extends TestCase {
String home = System.getProperty("maven.home");
if(home!=null) {
MavenInstallation mavenInstallation = new MavenInstallation("default",home);
((Maven.DescriptorImpl)hudson.getDescriptor(Maven.class)).setInstallations(mavenInstallation);
hudson.getDescriptorByType(Maven.DescriptorImpl.class).setInstallations(mavenInstallation);
return mavenInstallation;
}
@@ -319,7 +319,7 @@ public abstract class HudsonTestCase extends TestCase {
MavenInstallation mavenInstallation = new MavenInstallation("default",
new File(mvnHome,"maven-2.0.7").getAbsolutePath());
((Maven.DescriptorImpl)hudson.getDescriptor(Maven.class)).setInstallations(mavenInstallation);
hudson.getDescriptorByType(Maven.DescriptorImpl.class).setInstallations(mavenInstallation);
return mavenInstallation;
}