01: package net.firstpartners.nounit.ui.common;
02:
03: /**
04: * Title: NoUnit - Identify Classes that are not being unit Tested
05: *
06: * Copyright (C) 2001 Paul Browne , FirstPartners.net
07: *
08: *
09: * This program is free software; you can redistribute it and/or
10: * modify it under the terms of the GNU General Public License
11: * as published by the Free Software Foundation; either version 2
12: * of the License, or (at your option) any later version.
13: *
14: * This program is distributed in the hope that it will be useful,
15: * but WITHOUT ANY WARRANTY; without even the implied warranty of
16: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17: * GNU General Public License for more details.
18: *
19: * You should have received a copy of the GNU General Public License
20: * along with this program; if not, write to the Free Software
21: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22: *
23: * @author Paul Browne
24: * @version 0.7
25: */
26:
27: import java.util.HashMap;
28:
29: import net.firstpartners.nounit.utility.NoUnitException;
30:
31: /**
32: * Base Class for Checking Values within System
33: * set of page values that need checked.
34: */
35: public class CommandValueChecker extends AbstractValueChecker {
36:
37: /**
38: * checkCommandLineValues
39: * @param myValues - sets of Values to Check
40: * @return successFlag - true if all values match those specified
41: * @exception NoUnitCheckException if values do not match
42: */
43: public boolean checkValues(AbstractPackage myValues)
44: throws NoUnitException {
45:
46: boolean successFlag = true;
47:
48: //Make sure that the Directories Actually Exist
49: HashMap checkDirs = new HashMap();
50: checkDirs.put(CommandPackage.START_DIR,
51: CommandPackage.START_DIR);
52: checkDirs.put(CommandPackage.OUTPUT_DIR,
53: CommandPackage.OUTPUT_DIR);
54:
55: super .checkForDirsExist(myValues, checkDirs);
56:
57: //Make sure a report class file is passed in
58: HashMap checkStrings = new HashMap();
59: checkStrings.put(CommandPackage.REPORT_CLASS,
60: CommandPackage.REPORT_CLASS);
61:
62: super.checkForNullEmptyString(myValues, checkStrings);
63:
64: return successFlag;
65: }
66:
67: }
|