KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > firstpartners > nounit > ui > common > CommandValueChecker


1 package net.firstpartners.nounit.ui.common;
2
3 /**
4  * Title: NoUnit - Identify Classes that are not being unit Tested
5  *
6  * Copyright (C) 2001 Paul Browne , FirstPartners.net
7  *
8  *
9  * 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 JavaDoc;
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 JavaDoc checkDirs = new HashMap JavaDoc();
50         checkDirs.put(CommandPackage.START_DIR,CommandPackage.START_DIR);
51         checkDirs.put(CommandPackage.OUTPUT_DIR,CommandPackage.OUTPUT_DIR);
52         
53         super.checkForDirsExist(myValues,checkDirs);
54         
55         //Make sure a report class file is passed in
56
HashMap JavaDoc checkStrings = new HashMap JavaDoc();
57         checkStrings.put(CommandPackage.REPORT_CLASS,CommandPackage.REPORT_CLASS);
58         
59         super.checkForNullEmptyString(myValues,checkStrings);
60         
61         return successFlag;
62     }
63     
64     
65     
66     
67     
68     
69 }
Popular Tags