source: proiecte/HadoopJUnit/hadoop-0.20.1/src/test/org/apache/hadoop/cli/util/CLITestData.java

Last change on this file was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 3.1 KB
Line 
1/**
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  You may obtain a copy of the License at
9 *
10 *     http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19package org.apache.hadoop.cli.util;
20
21import java.util.ArrayList;
22
23/**
24 *
25 * Class to store CLI Test Data
26 */
27public class CLITestData {
28  private String testDesc = null;
29  private ArrayList<TestCmd> testCommands = null;
30  private ArrayList<TestCmd> cleanupCommands = null;
31  private ArrayList<ComparatorData> comparatorData = null;
32  private boolean testResult = false;
33 
34  public CLITestData() {
35
36  }
37
38  /**
39   * Class to define Test Command. includes type of the command and command itself
40   * Valid types FS, DFSADMIN and MRADMIN.
41   */
42  static public class TestCmd {
43    public enum CommandType {
44        FS,
45        DFSADMIN,
46        MRADMIN
47    }
48    private final CommandType type;
49    private final String cmd;
50
51    public TestCmd(String str, CommandType type) {
52      cmd = str;
53      this.type = type;
54    }
55    public CommandType getType() {
56      return type;
57    }
58    public String getCmd() {
59      return cmd;
60    }
61    public String toString() {
62      return cmd;
63    }
64  }
65 
66  /**
67   * @return the testDesc
68   */
69  public String getTestDesc() {
70    return testDesc;
71  }
72
73  /**
74   * @param testDesc the testDesc to set
75   */
76  public void setTestDesc(String testDesc) {
77    this.testDesc = testDesc;
78  }
79
80  /**
81   * @return the testCommands
82   */
83  public ArrayList<TestCmd> getTestCommands() {
84    return testCommands;
85  }
86
87  /**
88   * @param testCommands the testCommands to set
89   */
90  public void setTestCommands(ArrayList<TestCmd> testCommands) {
91    this.testCommands = testCommands;
92  }
93
94  /**
95   * @return the comparatorData
96   */
97  public ArrayList<ComparatorData> getComparatorData() {
98    return comparatorData;
99  }
100
101  /**
102   * @param comparatorData the comparatorData to set
103   */
104  public void setComparatorData(ArrayList<ComparatorData> comparatorData) {
105    this.comparatorData = comparatorData;
106  }
107
108  /**
109   * @return the testResult
110   */
111  public boolean getTestResult() {
112    return testResult;
113  }
114
115  /**
116   * @param testResult the testResult to set
117   */
118  public void setTestResult(boolean testResult) {
119    this.testResult = testResult;
120  }
121
122  /**
123   * @return the cleanupCommands
124   */
125  public ArrayList<TestCmd> getCleanupCommands() {
126    return cleanupCommands;
127  }
128
129  /**
130   * @param cleanupCommands the cleanupCommands to set
131   */
132  public void setCleanupCommands(ArrayList<TestCmd> cleanupCommands) {
133    this.cleanupCommands = cleanupCommands;
134  }
135}
Note: See TracBrowser for help on using the repository browser.