aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakozak2011-11-22 02:43:06 (EST)
committerWinston Prakash2011-12-01 20:46:54 (EST)
commite319a8290db2d6d67661880b53889e6066a7e959 (patch)
tree7171cbfdc90ea75b525e974eb40b93891c2bba57
parent81a8281205c7462e1dc37dc5940586d82a140f2b (diff)
downloadorg.eclipse.hudson.core-e319a8290db2d6d67661880b53889e6066a7e959.zip
org.eclipse.hudson.core-e319a8290db2d6d67661880b53889e6066a7e959.tar.gz
org.eclipse.hudson.core-e319a8290db2d6d67661880b53889e6066a7e959.tar.bz2
Improved coverage.
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
-rw-r--r--hudson-core/src/test/java/hudson/matrix/MatrixProjectTest.java42
1 files changed, 41 insertions, 1 deletions
diff --git a/hudson-core/src/test/java/hudson/matrix/MatrixProjectTest.java b/hudson-core/src/test/java/hudson/matrix/MatrixProjectTest.java
index 06bc0ac..cecfb70 100644
--- a/hudson-core/src/test/java/hudson/matrix/MatrixProjectTest.java
+++ b/hudson-core/src/test/java/hudson/matrix/MatrixProjectTest.java
@@ -95,6 +95,13 @@ public class MatrixProjectTest {
assertTrue(childProject1.isRunSequentially());
}
+ @Test
+ public void testSetRunSequentially() throws IOException {
+ MatrixProject childProject1 = new MatrixProject("child1");
+ childProject1.setAllowSave(false);
+ childProject1.setRunSequentially(true);
+ assertTrue(childProject1.isRunSequentially());
+ }
@Test
public void testGetCombinationFilterChildValue() throws IOException {
@@ -186,6 +193,17 @@ public class MatrixProjectTest {
}
@Test
+ public void testSetCombinationFilterNull() throws IOException {
+ MatrixProject childProject1 = new MatrixProject("child1"){
+ @Override
+ void rebuildConfigurations() throws IOException {
+ }
+ };
+ childProject1.setAllowSave(false);
+ assertNull(childProject1.getCombinationFilter());
+ }
+
+ @Test
public void testGetTouchStoneCombinationFilterChildValue() throws IOException {
String parentCombinationFilter = "parent_filter";
String childCombinationFilter = "child_filter";
@@ -222,6 +240,17 @@ public class MatrixProjectTest {
}
@Test
+ public void testGetTouchStoneCombinationNull() throws IOException {
+ MatrixProject childProject1 = new MatrixProject("child1"){
+ @Override
+ void rebuildConfigurations() throws IOException {
+ }
+ };
+ childProject1.setAllowSave(false);
+ assertNull(childProject1.getTouchStoneCombinationFilter());
+ }
+
+ @Test
public void testSetTouchStoneCombinationFilterDifferentValues() throws IOException {
String parentCombinationFilter = "parent_filter";
String childCombinationFilter = "child_filter";
@@ -273,7 +302,7 @@ public class MatrixProjectTest {
assertEquals(childProject1.touchStoneCombinationFilter, combinationFilter);
assertEquals(childProject1.getTouchStoneCombinationFilter(), combinationFilter);
}
- //touchStoneResultCondition
+
@Test
public void testGetTouchStoneResultConditionChildValue() throws IOException {
Result parentResultCondition = Result.SUCCESS;
@@ -363,6 +392,17 @@ public class MatrixProjectTest {
assertEquals(childProject1.getTouchStoneResultCondition(), childResultCondition);
}
+ @Test
+ public void testSetTouchStoneResultConditionNull() throws IOException {
+
+ MatrixProject childProject1 = new MatrixProject("child1"){
+ @Override
+ void rebuildConfigurations() throws IOException {
+ }
+ };
+ childProject1.setAllowSave(false);
+ assertNull(childProject1.getTouchStoneResultCondition());
+ }
private class MatrixProjectMock extends MatrixProject {