analysis: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.core.tests / stubs / org / eclipse / tracecompass / tmf / tests / stubs / analysis / AnalysisRequirementFactory.java
1 /*******************************************************************************
2 * Copyright (c) 2014 École Polytechnique de Montréal
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Guilliano Molaire - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.tracecompass.tmf.tests.stubs.analysis;
14
15 import java.util.Set;
16
17 import org.eclipse.tracecompass.tmf.core.analysis.TmfAnalysisRequirement;
18 import org.eclipse.tracecompass.tmf.core.analysis.TmfAnalysisRequirement.ValuePriorityLevel;
19
20 import com.google.common.collect.ImmutableSet;
21
22 /**
23 * Factory class to facilitate requirement usage across test case
24 */
25 @SuppressWarnings("javadoc")
26 public final class AnalysisRequirementFactory {
27
28 private AnalysisRequirementFactory() {}
29
30 public static final String REQUIREMENT_TYPE_1 = "car";
31 public static final String REQUIREMENT_TYPE_2 = "factory";
32 public static final String REQUIREMENT_TYPE_3 = "code";
33
34 public static final String REQUIREMENT_VALUE_1 = "value1";
35 public static final String REQUIREMENT_VALUE_2 = "value2";
36 public static final String REQUIREMENT_VALUE_3 = "value3";
37 public static final String REQUIREMENT_VALUE_4 = "value4";
38 public static final String REQUIREMENT_VALUE_5 = "value5";
39
40 public static final Set<String> REQUIREMENT_VALUES_1 = ImmutableSet.of(
41 REQUIREMENT_VALUE_1,
42 REQUIREMENT_VALUE_2,
43 REQUIREMENT_VALUE_3,
44 REQUIREMENT_VALUE_5
45 );
46
47 public static final Set<String> REQUIREMENT_VALUES_2 = ImmutableSet.of(
48 REQUIREMENT_VALUE_2,
49 REQUIREMENT_VALUE_3
50 );
51
52 public static final Set<String> REQUIREMENT_VALUES_3 = ImmutableSet.of(
53 REQUIREMENT_VALUE_3,
54 REQUIREMENT_VALUE_4,
55 REQUIREMENT_VALUE_5
56 );
57
58 public static final TmfAnalysisRequirement REQUIREMENT_1 =
59 new TmfAnalysisRequirement(REQUIREMENT_TYPE_1, REQUIREMENT_VALUES_1, ValuePriorityLevel.MANDATORY);
60 public static final TmfAnalysisRequirement REQUIREMENT_2 =
61 new TmfAnalysisRequirement(REQUIREMENT_TYPE_2);
62 public static final TmfAnalysisRequirement REQUIREMENT_3 =
63 new TmfAnalysisRequirement(REQUIREMENT_TYPE_3, REQUIREMENT_VALUES_3, ValuePriorityLevel.MANDATORY);
64
65 static {
66 REQUIREMENT_2.addValue(REQUIREMENT_VALUE_1, ValuePriorityLevel.MANDATORY);
67 REQUIREMENT_2.addValue(REQUIREMENT_VALUE_2, ValuePriorityLevel.OPTIONAL);
68 REQUIREMENT_2.addValue(REQUIREMENT_VALUE_3, ValuePriorityLevel.MANDATORY);
69 REQUIREMENT_2.addValue(REQUIREMENT_VALUE_4, ValuePriorityLevel.OPTIONAL);
70 REQUIREMENT_2.addValue(REQUIREMENT_VALUE_5, ValuePriorityLevel.MANDATORY);
71 }
72 }
This page took 0.031458 seconds and 5 git commands to generate.