/** Tests VSSHistory commandline generation with from label. */ public void testHistoryCommandLine1() { String[] sTestCmdLine = { MSVSS.SS_EXE, MSVSS.COMMAND_HISTORY, DS_VSS_PROJECT_PATH, MSVSS.FLAG_AUTORESPONSE_DEF, MSVSS.FLAG_VERSION_LABEL + LONG_LABEL + MSVSS.VALUE_FROMLABEL + SRC_LABEL, MSVSS.FLAG_LOGIN + VSS_USERNAME + "," + VSS_PASSWORD, MSVSS.FLAG_OUTPUT + project.getBaseDir().getAbsolutePath() + File.separator + OUTPUT }; // Set up a VSSHistory task MSVSSHISTORY vssHistory = new MSVSSHISTORY(); vssHistory.setProject(project); vssHistory.setLogin(VSS_USERNAME + "," + VSS_PASSWORD); vssHistory.setFromLabel(SRC_LABEL); vssHistory.setToLabel(LONG_LABEL + "blahblah"); vssHistory.setVsspath(VSS_PROJECT_PATH); vssHistory.setRecursive(false); vssHistory.setOutput(new File(project.getBaseDir().getAbsolutePath(), OUTPUT)); commandline = vssHistory.buildCmdLine(); checkCommandLines(sTestCmdLine, commandline.getCommandline()); }
/** Tests VSSHistory commandline generation with from date. */ public void testHistoryCommandLine2() { String[] sTestCmdLine = { MSVSS.SS_EXE, MSVSS.COMMAND_HISTORY, DS_VSS_PROJECT_PATH, MSVSS.FLAG_AUTORESPONSE_DEF, MSVSS.FLAG_VERSION_DATE + DATE + MSVSS.VALUE_FROMDATE + DATE2, MSVSS.FLAG_RECURSION, MSVSS.FLAG_LOGIN + VSS_USERNAME + "," + VSS_PASSWORD }; // Set up a VSSHistory task MSVSSHISTORY vssHistory = new MSVSSHISTORY(); vssHistory.setProject(project); vssHistory.setLogin(VSS_USERNAME + "," + VSS_PASSWORD); vssHistory.setFromDate(DATE2); vssHistory.setToDate(DATE); vssHistory.setVsspath(VSS_PROJECT_PATH); vssHistory.setRecursive(true); commandline = vssHistory.buildCmdLine(); checkCommandLines(sTestCmdLine, commandline.getCommandline()); }