Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Needed to trim the release and purpose string values (fixes JENKINS-8…
…613) Added a test case while I'm at it
- Loading branch information
Keith Mendoza
committed
Aug 4, 2011
1 parent
ee0845e
commit 5210802
Showing
2 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/test/java/hudson/plugins/synergy/impl/CreateProjectBaselineCommandTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package hudson.plugins.synergy.impl; | ||
|
||
import java.util.Arrays; | ||
import java.util.Vector; | ||
|
||
import org.junit.Test; | ||
import static org.junit.Assert.*; | ||
|
||
public class CreateProjectBaselineCommandTest { | ||
@Test | ||
public void testNoReleaseAndPurpose() { | ||
CreateProjectBaselineCommand cmd = new CreateProjectBaselineCommand("Test_baseline", "TestProj", "", ""); | ||
String[] cmdList = cmd.buildCommand("/opt/ccm/bin/ccm"); | ||
for(int i = 0; i<cmdList.length; i++) { | ||
if(cmdList[i] == "-r") | ||
fail("-r options should not be here"); | ||
} | ||
|
||
for(int i = 0; i<cmdList.length; i++) { | ||
if(cmdList[i] == "-purpose") | ||
fail("-p option should not be here"); | ||
} | ||
|
||
} | ||
} |