1 | void testGetFileFlags() {↵ | | 1 | void testCheckinFileFlags() {↵
|
2 | String[] sTestCmdLine = {"soscmd", "-command", "GetFile", "-file",↵ | | 2 | String[] sTestCmdLine = {"soscmd", "-command", "CheckInFile", "-file",↵
|
3 | SRC_FILE, "-revision", "007", "-server", SOS_SERVER_PATH, "-name",↵ | | 3 | SRC_FILE, "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵
|
4 | SOS_USERNAME, "-password", SOS_PASSWORD, "-database", VSS_SERVER_PATH,↵ | | 4 | "-password", SOS_PASSWORD, "-database", VSS_SERVER_PATH,↵
|
5 | ↵ | | 5 | "-project",↵
|
6 | "-project", DS_VSS_PROJECT_PATH, "-verbose", "-nocompress",↵ | | 6 | DS_VSS_PROJECT_PATH, "-verbose", "-nocompress", "-nocache",↵
|
7 | "-nocache", "-workdir", project.getBaseDir().getAbsolutePath()↵ | | 7 | "-workdir", project.getBaseDir().getAbsolutePath()↵
|
8 | + File.separator + LOCAL_PATH↵ | | 8 | + File.separator↵
|
9 | };↵ | | 9 | + LOCAL_PATH, "-log", SRC_COMMENT};↵
|
|
10 | // Set up a SOSGet task↵ | | 10 | // Set up a SOSCheckin task↵
|
11 | SOSGet sosGet = new SOSGet();↵ | | 11 | SOSCheckin sosCheckin = new SOSCheckin();↵
|
12 | sosGet.setProject(project);↵ | | 12 | sosCheckin.setProject(project);↵
|
13 | sosGet.setVssServerPath(VSS_SERVER_PATH);↵ | | 13 | sosCheckin.setVssServerPath(VSS_SERVER_PATH);↵
|
14 | sosGet.setSosServerPath(SOS_SERVER_PATH);↵ | | 14 | sosCheckin.setSosServerPath(SOS_SERVER_PATH);↵
|
15 | sosGet.setProjectPath(VSS_PROJECT_PATH);↵ | | 15 | sosCheckin.setProjectPath(VSS_PROJECT_PATH);↵
|
16 | sosGet.setFile(SRC_FILE);↵ | | 16 | sosCheckin.setFile(SRC_FILE);↵
|
17 | sosGet↵ | | 17 | sosCheckin.setComment(SRC_COMMENT);↵
|
18 | .setUsername(SOS_USERNAME);↵ | | 18 | sosCheckin.setUsername(SOS_USERNAME);↵
|
19 | sosGet.setPassword(SOS_PASSWORD);↵ | | 19 | sosCheckin.setPassword(SOS_PASSWORD);↵
|
20 | sosGet.setVersion(VERSION);↵ | | 20 | sos↵
|
21 | sosGet.setLocalPath(new Path(project, LOCAL_PATH));↵ | | 21 | Checkin.setLocalPath(new Path(project, LOCAL_PATH));↵
|
22 | sosGet.setNoCache(true);↵ | | 22 | sosCheckin.setNoCache(true);↵
|
23 | sosGet.setNoCompress(true);↵ | | 23 | sosCheckin.setNoCompress(true);↵
|
24 | sosGet.setVerbose(true);↵ | | 24 | sosCheckin.setVerbose(true);↵
|
25 | sosGet.setRecursive(true);↵ | | 25 | sosCheckin.setRecursive(true);↵
|
|
26 | commandline = sosGet.buildCmdLine();↵ | | 26 | commandline = sosCheckin.buildCmdLine();↵
|
|
27 | checkCommandLines(sTestCmdLine, commandline.getCommandline());↵ | | 27 | checkCommandLines(sTestCmdLine, commandline.getCommandline());↵
|
28 | }↵ | | 28 | }↵
|
|
29 | /** Test SOSGetProject flags & commandline generation */↵ | | 29 | /** Test CheckInProject option flags */↵
|
30 | public void testGetProjectFlags() {↵ | | 30 | public void testCheckinProjectFlags() {↵
|
31 | String[] sTestCmdLine = {"soscmd", "-command", "GetProject", "-recursive",↵ | | 31 | String[] sTestCmdLine = {"soscmd", "-command", "CheckInProject",↵
|
32 | "-label", SRC_LABEL, "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵ | | 32 | "-recursive", "-server", SOS_SERVER_PATH, "-name", SOS_USERNAME,↵
|
33 | "-password", "", "-database", VSS_SERVER_PATH, "-project",↵ | | 33 | "-password", "", "-database", VSS_SERVER_PATH, "-project",↵
|
34 | DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",↵ | | 34 | DS_VSS_PROJECT_PATH, "", "", "-soshome", SOS_HOME, "-workdir",↵
|
35 | project.getBaseDir().getAbsolutePath()};↵ | | 35 | project.getBaseDir().getAbsolutePath(), "-log", SRC_COMMENT,};↵
|
|
36 | // Set up a SOSGet task↵ | | 36 | // Set up a SOSCheckin task↵
|
37 | SOSGet sosGet = new SOSGet();↵ | | 37 | SOSCheckin sosCheckin = new SOSCheckin();↵
|
38 | sosGet.setProject(project);↵ | | 38 | sosCheckin.setProject(project);↵
|
39 | sosGet.setVssServerPath(VSS_SERVER_PATH);↵ | | 39 | sosCheckin.setVssServerPath(VSS_SERVER_PATH);↵
|
40 | sosGet.setSosServerPath(SOS_SERVER_PATH);↵ | | 40 | sosCheckin.setSosServerPath(SOS_SERVER_PATH);↵
|
41 | sosGet.setProjectPath(DS_VSS_PROJECT_PATH);↵ | | 41 | sosCheckin.setProjectPath(DS_VSS_PROJECT_PATH);↵
|
42 | sosGet | | 42 | sosCheckin
|