1 | sosCheckin.setPassword(SOS_PASSWORD);↵ | | 1 | sosGet.setVersion(VERSION);↵
|
2 | sosCheckin.setLocalPath(new Path(project, LOCAL_PATH));↵ | | 2 | sosGet.setLocalPath(new Path(project, LOCAL_PATH));↵
|
3 | sosCheckin.setNoCache(true);↵ | | 3 | sosGet.setNoCache(true);↵
|
4 | sosCheckin.setNoCompress(true);↵ | | 4 | sosGet.setNoCompress(true);↵
|
5 | sosCheckin.setVerbose(true);↵ | | 5 | sosGet.setVerbose(true);↵
|
6 | sosCheckin.setRecursive(true);↵ | | 6 | sosGet.setRecursive(true);↵
|
|
7 | commandline = sosCheckin.buildCmdLine();↵ | | 7 | commandline = sosGet.buildCmdLine();↵
|
|
8 | checkCommandLines(sTestCmdLine, commandline.getCommandline());↵ | | 8 | checkCommandLines(sTestCmdLine, commandline.getCommandline());↵
|
9 | }↵ | | 9 | }↵
|
|
10 | /** Test CheckInProject option flags */↵ | | 10 | /** Test SOSGetProject flags & commandline generation */↵
|
11 | public void testCheckinProjectFlags() {↵ | | 11 | public void testGetProjectFlags() {↵
|
12 | String[] sTestCmdLine = {"soscmd", "-command", "CheckInProject",↵ | | 12 | String[] sTestCmdLine = {"soscmd", "-command", "GetProject", "-recursive",↵
|
13 | "-recursive", "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵ | | 13 | "-label", SRC_LABEL, "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵
|
14 | "-password", "", "-database", VSS_SERVER_PATH, "-project",↵ | | 14 | "-password", "", "-database", VSS_SERVER_PATH, "-project",↵
|
15 | DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",↵ | | 15 | DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",↵
|
16 | project.getBaseDir().getAbsolutePath(), "-log", SRC_COMMENT,};↵ | | 16 | project.getBaseDir().getAbsolutePath()};↵
|
|
17 | // Set up a SOSCheckin task↵ | | 17 | // Set up a SOSGet task↵
|
18 | SOSCheckin sosCheckin = new SOSCheckin();↵ | | 18 | SOSGet sosGet = new SOSGet();↵
|
19 | sosCheckin.setProject(project);↵ | | 19 | sosGet.setProject(project);↵
|
20 | sosCheckin.setVssServerPath(VSS_SERVER_PATH);↵ | | 20 | sosGet.setVssServerPath(VSS_SERVER_PATH);↵
|
21 | sosCheckin.setSosServerPath(SOS_SERVER_PATH);↵ | | 21 | sosGet.setSosServerPath(SOS_SERVER_PATH);↵
|
22 | sosCheckin.setProjectPath(DS_VSS_PROJECT_PATH);↵ | | 22 | sosGet.setProjectPath(DS_VSS_PROJECT_PATH);↵
|
23 | sosCheckin.setComment(SRC_COMMENT);↵ | | 23 | sosGet.setLabel(SRC_LABEL);↵
|
24 | sosCheckin.setUsername(SOS_USERNAME);↵ | | 24 | sosGet.setUsername(SOS_USERNAME);↵
|
25 | sosCheckin.setSosHome(SOS_HOME);↵ | | 25 | sosGet.setSosHome(SOS_HOME);↵
|
26 | sosCheckin.setNoCache(true);↵ | | 26 | sosGet.setNoCache(true);↵
|
27 | sosCheckin.setNoCompress(false);↵ | | 27 | sosGet.setNoCompress(false);↵
|
28 | sosCheckin.setVerbose(false);↵ | | 28 | sosGet.setVerbose(false);↵
|
29 | sosCheckin.setRecursive(true);↵ | | 29 | sosGet.setRecursive(true);↵
|
|
30 | commandline = sosCheckin.buildCmdLine();↵ | | 30 | commandline = sosGet.buildCmdLine();↵
|
|
31 | checkCommandLines(sTestCmdLine, commandline.getCommandline());↵ | | 31 | checkCommandLines(sTestCmdLine, commandline.getCommandline());↵
|
32 | }↵ | | 32 | }↵
|
|
33 | /** Test SOSCheckIn required attributes. */↵ | | 33 | /** Tests SOSGet required attributes. */↵
|
34 | public void testCheckinExceptions() {↵ | | 34 | public void testGetExceptions() {↵
|
35 | configureProject("src/etc/testcases/taskdefs/optional/sos/sos.xml");↵ | | 35 | configureProject("src/etc/testcases/taskdefs/optional/sos/sos.xml");↵
|
36 | expectSpecificBuildException("soscheckin.1", "some cause", "sosserverpath attribute must be set!");↵ | | 36 | expectSpecificBuildException("sosget.1", "some cause", "sosserverpath attribute must be set!");↵
|
37 | expectSpecificBuildException("soscheckin.2", "some cause", "username attribute must be set!");↵ | | 37 | expectSpecificBuildException("sosget.2", "some cause", "username attribute must be set!");↵
|
38 | expectSpecificBuildException("soscheckin.3", "some cause", "vssserverpath attribute must be set!");↵ | | 38 | expectSpecificBuildException("sosget.3", "some cause", "vssserverpath attribute must be set!");↵
|
39 | expectSpecificBuildException("soscheckin.4", "some cause", "projectpath attribute must be set!");↵ | | 39 | expectSpecificBuildException("sosget.4", "some cause", "projectpath attribute must be set!");↵
|
40 | | | 40 |
|