aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakozak2011-11-22 10:17:45 (EST)
committerWinston Prakash2011-12-01 20:47:02 (EST)
commit102655b4ccd738ee900805c62f5be9422aba83ab (patch)
tree67ff4d1165abad8d4771f85d94c5ac5f90e682e5
parenta1422716b371382e16b7861030e963fb9133b0f1 (diff)
downloadorg.eclipse.hudson.core-102655b4ccd738ee900805c62f5be9422aba83ab.zip
org.eclipse.hudson.core-102655b4ccd738ee900805c62f5be9422aba83ab.tar.gz
org.eclipse.hudson.core-102655b4ccd738ee900805c62f5be9422aba83ab.tar.bz2
Add XStream alias for job properties. Move ProjectProperties to separate package
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
-rw-r--r--hudson-core/src/main/java/hudson/model/AbstractProject.java2
-rw-r--r--hudson-core/src/main/java/hudson/model/Items.java7
-rw-r--r--hudson-core/src/main/java/hudson/model/Job.java12
-rw-r--r--hudson-core/src/main/java/hudson/model/project/property/BaseProjectProperty.java (renamed from hudson-core/src/main/java/hudson/model/BaseProjectProperty.java)2
-rw-r--r--hudson-core/src/main/java/hudson/model/project/property/BooleanProjectProperty.java (renamed from hudson-core/src/main/java/hudson/model/BooleanProjectProperty.java)2
-rw-r--r--hudson-core/src/main/java/hudson/model/project/property/IntegerProjectProperty.java (renamed from hudson-core/src/main/java/hudson/model/IntegerProjectProperty.java)2
-rw-r--r--hudson-core/src/main/java/hudson/model/project/property/StringProjectProperty.java (renamed from hudson-core/src/main/java/hudson/model/StringProjectProperty.java)2
-rw-r--r--hudson-core/src/test/java/hudson/model/FreeStyleProjectMock.java23
-rw-r--r--hudson-core/src/test/java/hudson/model/FreeStyleProjectTest.java56
-rw-r--r--hudson-core/src/test/java/hudson/model/project/property/ProjectPropertyTest.java (renamed from hudson-core/src/test/java/hudson/model/ProjectPropertyTest.java)5
10 files changed, 65 insertions, 48 deletions
diff --git a/hudson-core/src/main/java/hudson/model/AbstractProject.java b/hudson-core/src/main/java/hudson/model/AbstractProject.java
index 5f2f1df..35d1f6d 100644
--- a/hudson-core/src/main/java/hudson/model/AbstractProject.java
+++ b/hudson-core/src/main/java/hudson/model/AbstractProject.java
@@ -38,6 +38,7 @@ import hudson.model.Queue.WaitingItem;
import hudson.model.RunMap.Constructor;
import hudson.model.labels.LabelAtom;
import hudson.model.labels.LabelExpression;
+import hudson.model.project.property.IntegerProjectProperty;
import hudson.model.queue.CauseOfBlockage;
import hudson.model.queue.SubTask;
import hudson.model.queue.SubTaskContributor;
@@ -89,7 +90,6 @@ import java.util.logging.Logger;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONObject;
-import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.eclipse.hudson.api.model.IAbstractProject;
diff --git a/hudson-core/src/main/java/hudson/model/Items.java b/hudson-core/src/main/java/hudson/model/Items.java
index e4d5ef1..28e5b81 100644
--- a/hudson-core/src/main/java/hudson/model/Items.java
+++ b/hudson-core/src/main/java/hudson/model/Items.java
@@ -19,13 +19,13 @@ package hudson.model;
import com.thoughtworks.xstream.XStream;
import hudson.DescriptorExtensionList;
import hudson.Extension;
-import hudson.scm.RepositoryBrowser;
+import hudson.model.project.property.BooleanProjectProperty;
+import hudson.model.project.property.IntegerProjectProperty;
+import hudson.model.project.property.StringProjectProperty;
import hudson.matrix.MatrixProject;
import hudson.matrix.MatrixConfiguration;
import hudson.XmlFile;
import hudson.matrix.Axis;
-import hudson.matrix.MatrixConfiguration;
-import hudson.matrix.MatrixProject;
import hudson.util.DescriptorList;
import hudson.util.XStream2;
@@ -135,5 +135,6 @@ public class Items {
XSTREAM.alias("integer-property", IntegerProjectProperty.class);
XSTREAM.alias("boolean-property", BooleanProjectProperty.class);
XSTREAM.alias("string-property", StringProjectProperty.class);
+ XSTREAM.aliasField("project-properties", Job.class, "jobProperties");
}
}
diff --git a/hudson-core/src/main/java/hudson/model/Job.java b/hudson-core/src/main/java/hudson/model/Job.java
index 2560ab6..1fca2d4 100644
--- a/hudson-core/src/main/java/hudson/model/Job.java
+++ b/hudson-core/src/main/java/hudson/model/Job.java
@@ -18,12 +18,14 @@
package hudson.model;
import hudson.Functions;
+import hudson.model.project.property.BooleanProjectProperty;
+import hudson.model.project.property.IntegerProjectProperty;
+import hudson.model.project.property.StringProjectProperty;
import hudson.util.graph.GraphSeries;
import hudson.widgets.Widget;
import java.lang.reflect.InvocationTargetException;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.CopyOnWriteArraySet;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import com.google.common.collect.Sets;
@@ -1368,14 +1370,6 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
return cascadingProject;
}
- /**
- * For the unit tests only. Sets cascadingProject for the job.
- *
- * @param cascadingProject parent job
- */
- void setCascadingProject(JobT cascadingProject) {
- this.cascadingProject = cascadingProject;
- }
/**
* Checks whether current job is inherited from other project.
diff --git a/hudson-core/src/main/java/hudson/model/BaseProjectProperty.java b/hudson-core/src/main/java/hudson/model/project/property/BaseProjectProperty.java
index b89ba77..af6e0ea 100644
--- a/hudson-core/src/main/java/hudson/model/BaseProjectProperty.java
+++ b/hudson-core/src/main/java/hudson/model/project/property/BaseProjectProperty.java
@@ -13,7 +13,7 @@
*
*******************************************************************************/
-package hudson.model;
+package hudson.model.project.property;
import org.apache.commons.lang3.ObjectUtils;
import org.eclipse.hudson.api.model.IJob;
diff --git a/hudson-core/src/main/java/hudson/model/BooleanProjectProperty.java b/hudson-core/src/main/java/hudson/model/project/property/BooleanProjectProperty.java
index d189042..fba0c33 100644
--- a/hudson-core/src/main/java/hudson/model/BooleanProjectProperty.java
+++ b/hudson-core/src/main/java/hudson/model/project/property/BooleanProjectProperty.java
@@ -12,7 +12,7 @@
* Nikita Levyankov
*
*******************************************************************************/
-package hudson.model;
+package hudson.model.project.property;
import org.eclipse.hudson.api.model.IJob;
diff --git a/hudson-core/src/main/java/hudson/model/IntegerProjectProperty.java b/hudson-core/src/main/java/hudson/model/project/property/IntegerProjectProperty.java
index 874426e..1e8e18e 100644
--- a/hudson-core/src/main/java/hudson/model/IntegerProjectProperty.java
+++ b/hudson-core/src/main/java/hudson/model/project/property/IntegerProjectProperty.java
@@ -12,7 +12,7 @@
* Nikita Levyankov
*
*******************************************************************************/
-package hudson.model;
+package hudson.model.project.property;
import org.eclipse.hudson.api.model.IJob;
diff --git a/hudson-core/src/main/java/hudson/model/StringProjectProperty.java b/hudson-core/src/main/java/hudson/model/project/property/StringProjectProperty.java
index 461d717..dffae46 100644
--- a/hudson-core/src/main/java/hudson/model/StringProjectProperty.java
+++ b/hudson-core/src/main/java/hudson/model/project/property/StringProjectProperty.java
@@ -13,7 +13,7 @@
*
*******************************************************************************/
-package hudson.model;
+package hudson.model.project.property;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.hudson.api.model.IJob;
diff --git a/hudson-core/src/test/java/hudson/model/FreeStyleProjectMock.java b/hudson-core/src/test/java/hudson/model/FreeStyleProjectMock.java
index b647887..b4093a5 100644
--- a/hudson-core/src/test/java/hudson/model/FreeStyleProjectMock.java
+++ b/hudson-core/src/test/java/hudson/model/FreeStyleProjectMock.java
@@ -15,6 +15,8 @@
package hudson.model;
+import org.eclipse.hudson.api.model.IProjectProperty;
+
/**
* Mock class for FreeStyleProject
* <p/>
@@ -22,7 +24,7 @@ package hudson.model;
*
* @author Nikita Levyankov
*/
-class FreeStyleProjectMock extends FreeStyleProject {
+public class FreeStyleProjectMock extends FreeStyleProject {
public FreeStyleProjectMock(String name) {
super((ItemGroup) null, name);
@@ -32,4 +34,23 @@ class FreeStyleProjectMock extends FreeStyleProject {
@Override
protected void updateTransientActions() {
}
+
+ /**
+ * For the unit tests only. Sets cascadingProject for the job.
+ *
+ * @param cascadingProject parent job
+ */
+ public void setCascadingProject(FreeStyleProject cascadingProject) {
+ this.cascadingProject = cascadingProject;
+ }
+
+ /**
+ * Increase visibility for testing,
+ *
+ * @param key key.
+ * @param property property instance.
+ */
+ public void putJobProperty(String key, IProjectProperty property) {
+ super.putJobProperty(key, property);
+ }
} \ No newline at end of file
diff --git a/hudson-core/src/test/java/hudson/model/FreeStyleProjectTest.java b/hudson-core/src/test/java/hudson/model/FreeStyleProjectTest.java
index 253a5eb..14b1688 100644
--- a/hudson-core/src/test/java/hudson/model/FreeStyleProjectTest.java
+++ b/hudson-core/src/test/java/hudson/model/FreeStyleProjectTest.java
@@ -198,7 +198,7 @@ public class FreeStyleProjectTest {
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setLogRotator(new LogRotator(10,11,12,13));
- FreeStyleProject childProject1 = new FreeStyleProjectMock("child1");
+ FreeStyleProjectMock childProject1 = new FreeStyleProjectMock("child1");
childProject1.setCascadingProject(parentProject);
LogRotator result = childProject1.getLogRotator();
assertNotNull(result);
@@ -210,7 +210,7 @@ public class FreeStyleProjectTest {
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setLogRotator(new LogRotator(10,10,10,10));
- FreeStyleProject childProject1 = new FreeStyleProjectMock("child1");
+ FreeStyleProjectMock childProject1 = new FreeStyleProjectMock("child1");
childProject1.setLogRotator(new LogRotator(20, 20, 20, 20));
childProject1.setCascadingProject(parentProject);
LogRotator result = childProject1.getLogRotator();
@@ -223,7 +223,7 @@ public class FreeStyleProjectTest {
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setLogRotator(new LogRotator(10,11,12,13));
- FreeStyleProject childProject1 = new FreeStyleProjectMock("child1");
+ FreeStyleProjectMock childProject1 = new FreeStyleProjectMock("child1");
childProject1.setCascadingProject(parentProject);
childProject1.setLogRotator(new LogRotator(10, 11, 12, 13));
childProject1.setCascadingProject(null); // else log rotator will be taken from parent
@@ -243,7 +243,7 @@ public class FreeStyleProjectTest {
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
String customWorkspace = "/tmp";
parentProject.setCustomWorkspace(customWorkspace);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setCustomWorkspace(customWorkspace);
childProject.setCascadingProject(null);
@@ -256,7 +256,7 @@ public class FreeStyleProjectTest {
String parentCustomWorkspace = "/tmp";
String childCustomWorkspace = "/tmp1";
parentProject.setCustomWorkspace(parentCustomWorkspace);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setCustomWorkspace(childCustomWorkspace);
assertEquals(childCustomWorkspace, childProject.getCustomWorkspace());
@@ -273,7 +273,7 @@ public class FreeStyleProjectTest {
@Test
public void testGetCustomWorkspace() throws IOException{
String customWorkspace = "/tmp";
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCustomWorkspace(customWorkspace);
assertEquals(customWorkspace, childProject.getCustomWorkspace());
@@ -291,7 +291,7 @@ public class FreeStyleProjectTest {
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
String jdkName = "sun-java5-jdk32";
parentProject.setJDK(jdkName);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setJDK(jdkName);
childProject.setCascadingProject(null);
@@ -304,7 +304,7 @@ public class FreeStyleProjectTest {
String parentJdkName = "sun-java5-jdk32";
String childJdkName = "sun-java6-jdk32";
parentProject.setJDK(parentJdkName);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setJDK(childJdkName);
assertEquals(childJdkName, childProject.getJDKName());
@@ -321,7 +321,7 @@ public class FreeStyleProjectTest {
@Test
public void testGetJdkName() throws IOException{
String JdkName = "sun-java6-jdk32";
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setJDK(JdkName);
assertEquals(JdkName, childProject.getJDKName());
@@ -339,7 +339,7 @@ public class FreeStyleProjectTest {
String quietPeriod = "10";
int globalQuietPeriod = 4;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
Hudson hudson = createMock(Hudson.class);
expect(hudson.getQuietPeriod()).andReturn(globalQuietPeriod).anyTimes();
mockStatic(Hudson.class);
@@ -357,7 +357,7 @@ public class FreeStyleProjectTest {
String quietPeriod = "4";
int globalQuietPeriod = 4;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
Hudson hudson = createMock(Hudson.class);
expect(hudson.getQuietPeriod()).andReturn(globalQuietPeriod).anyTimes();
mockStatic(Hudson.class);
@@ -377,7 +377,7 @@ public class FreeStyleProjectTest {
String childQuietPeriod = "11";
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setQuietPeriod(parentQuietPeriod);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setQuietPeriod(childQuietPeriod);
@@ -417,7 +417,7 @@ public class FreeStyleProjectTest {
String quietPeriodString = "10";
int globalQuietPeriod = 4;
int quietPeriod = Integer.parseInt(quietPeriodString);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
Hudson hudson = createMock(Hudson.class);
expect(hudson.getQuietPeriod()).andReturn(globalQuietPeriod).anyTimes();
@@ -444,7 +444,7 @@ public class FreeStyleProjectTest {
int globalScmCheckoutRetryCount = 4;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setScmCheckoutRetryCount(scmCheckoutRetryCount);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
Hudson hudson = createMock(Hudson.class);
expect(hudson.getScmCheckoutRetryCount()).andReturn(globalScmCheckoutRetryCount);
mockStatic(Hudson.class);
@@ -463,7 +463,7 @@ public class FreeStyleProjectTest {
String childScmCheckoutRetryCount = "11";
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setScmCheckoutRetryCount(parentScmCheckoutRetryCount);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setScmCheckoutRetryCount(childScmCheckoutRetryCount);
@@ -503,7 +503,7 @@ public class FreeStyleProjectTest {
String scmCheckoutRetryCountString = "10";
int globalScmCheckoutRetryCount = 4;
int scmCheckoutRetryCount = Integer.parseInt(scmCheckoutRetryCountString);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
Hudson hudson = createMock(Hudson.class);
expect(hudson.getScmCheckoutRetryCount()).andReturn(globalScmCheckoutRetryCount).anyTimes();
@@ -529,7 +529,7 @@ public class FreeStyleProjectTest {
Boolean blockBuildWhenDownstreamBuilding = true;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setBlockBuildWhenDownstreamBuilding(blockBuildWhenDownstreamBuilding);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setBlockBuildWhenDownstreamBuilding(blockBuildWhenDownstreamBuilding);
assertFalse(childProject.blockBuildWhenDownstreamBuilding);
@@ -541,7 +541,7 @@ public class FreeStyleProjectTest {
Boolean parentBlockBuildWhenDownstreamBuilding = true;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setBlockBuildWhenDownstreamBuilding(parentBlockBuildWhenDownstreamBuilding);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setBlockBuildWhenDownstreamBuilding(childBlockBuildWhenDownstreamBuilding);
//if child value is not equals to parent one, field should be populated
@@ -566,7 +566,7 @@ public class FreeStyleProjectTest {
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setBlockBuildWhenDownstreamBuilding(parentBlockBuildWhenDownstreamBuilding);
assertEquals(parentBlockBuildWhenDownstreamBuilding, parentProject.blockBuildWhenDownstreamBuilding());
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
//Set equal to parent in order to inherit from cascading project
childProject.setCascadingProject(parentProject);
childProject.setBlockBuildWhenDownstreamBuilding(parentBlockBuildWhenDownstreamBuilding);
@@ -582,7 +582,7 @@ public class FreeStyleProjectTest {
boolean blockBuildWhenUpstreamBuilding = true;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setBlockBuildWhenUpstreamBuilding(blockBuildWhenUpstreamBuilding);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setBlockBuildWhenUpstreamBuilding(blockBuildWhenUpstreamBuilding);
assertFalse(childProject.getBooleanProperty(AbstractProject.BLOCK_BUILD_WHEN_UPSTREAM_BUILDING_PROPERTY_NAME)
@@ -595,7 +595,7 @@ public class FreeStyleProjectTest {
Boolean parentBlockBuildWhenUpstreamBuilding = true;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setBlockBuildWhenUpstreamBuilding(parentBlockBuildWhenUpstreamBuilding);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setBlockBuildWhenUpstreamBuilding(childBlockBuildWhenUpstreamBuilding);
//if child value is not equals to parent one, field should be populated
@@ -619,7 +619,7 @@ public class FreeStyleProjectTest {
boolean parentBlockBuildWhenUpstreamBuilding = true;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setBlockBuildWhenUpstreamBuilding(parentBlockBuildWhenUpstreamBuilding);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
//Set equal to parent in order to inherit from cascading project
childProject.setBlockBuildWhenUpstreamBuilding(parentBlockBuildWhenUpstreamBuilding);
childProject.setCascadingProject(parentProject);
@@ -636,7 +636,7 @@ public class FreeStyleProjectTest {
boolean cleanWorkspaceRequired = true;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setCleanWorkspaceRequired(cleanWorkspaceRequired);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setCleanWorkspaceRequired(cleanWorkspaceRequired);
assertFalse(
@@ -649,7 +649,7 @@ public class FreeStyleProjectTest {
Boolean parentCleanWorkspaceRequired = true;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setCleanWorkspaceRequired(parentCleanWorkspaceRequired);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setCleanWorkspaceRequired(childCleanWorkspaceRequired);
//if child value is not equals to parent one, field should be populated
@@ -673,7 +673,7 @@ public class FreeStyleProjectTest {
boolean parentCleanWorkspaceRequired = true;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setCleanWorkspaceRequired(parentCleanWorkspaceRequired);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCleanWorkspaceRequired(parentCleanWorkspaceRequired);
childProject.setCascadingProject(parentProject);
//Value should be taken from cascadingProject
@@ -688,7 +688,7 @@ public class FreeStyleProjectTest {
Boolean concurrentBuild = true;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setConcurrentBuild(concurrentBuild);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setConcurrentBuild(concurrentBuild);
assertFalse(childProject.getBooleanProperty(AbstractProject.CONCURRENT_BUILD_PROPERTY_NAME).getOriginalValue());
@@ -700,7 +700,7 @@ public class FreeStyleProjectTest {
Boolean parentConcurrentBuild = true;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setConcurrentBuild(parentConcurrentBuild);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setConcurrentBuild(childConcurrentBuild);
//if child value is not equals to parent one, field should be populated
@@ -724,7 +724,7 @@ public class FreeStyleProjectTest {
boolean parentConcurrentBuild = true;
FreeStyleProject parentProject = new FreeStyleProjectMock("parent");
parentProject.setConcurrentBuild(parentConcurrentBuild);
- FreeStyleProject childProject = new FreeStyleProjectMock("child");
+ FreeStyleProjectMock childProject = new FreeStyleProjectMock("child");
childProject.setCascadingProject(parentProject);
childProject.setConcurrentBuild(true);
//Value should be taken from cascadingProject
diff --git a/hudson-core/src/test/java/hudson/model/ProjectPropertyTest.java b/hudson-core/src/test/java/hudson/model/project/property/ProjectPropertyTest.java
index 27a259d..775b1cf 100644
--- a/hudson-core/src/test/java/hudson/model/ProjectPropertyTest.java
+++ b/hudson-core/src/test/java/hudson/model/project/property/ProjectPropertyTest.java
@@ -13,8 +13,9 @@
*
*******************************************************************************/
-package hudson.model;
+package hudson.model.project.property;
+import hudson.model.FreeStyleProjectMock;
import org.junit.Before;
import org.junit.Test;
@@ -34,7 +35,7 @@ import static junit.framework.Assert.fail;
*/
@SuppressWarnings("unchecked")
public class ProjectPropertyTest {
- private FreeStyleProject project;
+ private FreeStyleProjectMock project;
private FreeStyleProjectMock parent;
private final String propertyKey = "propertyKey";