| author | akozak | 2011-11-22 02:43:06 (EST) |
|---|---|---|
| committer | Winston Prakash | 2011-12-01 20:46:54 (EST) |
| commit | 19ea766c6643a336c6a50e46f8da67e3d751c6fa (patch) (side-by-side diff) | |
| tree | d6785d5215c7280b8daeae48dfedc7d46ded8284 | |
| parent | 1fbc1c5cede31d56aa9e85d2a991961bd0c11a57 (diff) | |
| download | org.eclipse.hudson.core-19ea766c6643a336c6a50e46f8da67e3d751c6fa.zip org.eclipse.hudson.core-19ea766c6643a336c6a50e46f8da67e3d751c6fa.tar.gz org.eclipse.hudson.core-19ea766c6643a336c6a50e46f8da67e3d751c6fa.tar.bz2 | |
Improved coverage.
Signed-off-by: Winston Prakash <winston.prakash@gmail.com>
| -rw-r--r-- | hudson-core/src/test/java/hudson/matrix/MatrixProjectTest.java | 42 |
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 { |

