|
32 | 32 | * <p>This class tests all variations of the GETMAIN64 command found in the link above.
|
33 | 33 | */
|
34 | 34 | public class TestCicsGetMain64 {
|
35 |
| - private static final String ALL_VALID_ONE = "GETMAIN64 SET({$varOne}) FLENGTH({$varTwo}) LOCATION({$varThree}) EXECUTABLE SHARED NOSUSPEND USERDATAKEY"; |
36 |
| - private static final String ALL_VALID_TWO = "GETMAIN64 FLENGTH({$varTwo}) SHARED EXECUTABLE LOCATION({$varTwo}) NOSUSPEND CICSDATAKEY SET({$varOne})"; |
37 |
| - |
38 |
| - private static final String SOME_VALID_ONE = "GETMAIN64 FLENGTH({$varThree}) SHARED CICSDATAKEY SET({$varOne}) LOCATION({$varTwo})"; |
39 |
| - private static final String SOME_VALID_TWO = "GETMAIN64 NOSUSPEND FLENGTH({$varThree}) SET({$varOne}) LOCATION({$varTwo}) EXECUTABLE"; |
40 |
| - private static final String SOME_VALID_THREE = "GETMAIN64 SET({$varOne}) NOSUSPEND FLENGTH({$varTwo}) USERDATAKEY"; |
41 |
| - |
42 |
| - private static final String BARE_VALID = "GETMAIN64 FLENGTH({$varTwo}) SET({$varOne})"; |
43 |
| - |
44 |
| - private static final String INVALID_ONE = "GETMAIN64 SET({$varTwo}) FLENGTH({$varThree}) {EXECUTABLE|error1} SHARED"; |
45 |
| - private static final String INVALID_TWO = "GETMAIN64 {USERDATAKEY|error1} FLENGTH({$varTwo}) SET({$varOne}) {CICSDATAKEY|error1}"; |
46 |
| - |
47 |
| - @Test |
48 |
| - void testAllValidOne() { |
49 |
| - CICSTestUtils.noErrorTest(ALL_VALID_ONE); |
50 |
| - } |
51 |
| - |
52 |
| - @Test |
53 |
| - void testAllValidTwo() { |
54 |
| - CICSTestUtils.noErrorTest(ALL_VALID_TWO); |
55 |
| - } |
56 |
| - |
57 |
| - @Test |
58 |
| - void testSomeValidOne() { |
59 |
| - CICSTestUtils.noErrorTest(SOME_VALID_ONE); |
60 |
| - } |
61 |
| - |
62 |
| - @Test |
63 |
| - void testSomeValidTwo() { |
64 |
| - CICSTestUtils.noErrorTest(SOME_VALID_TWO); |
65 |
| - } |
66 |
| - |
67 |
| - @Test |
68 |
| - void testSomeValidThree() { |
69 |
| - CICSTestUtils.noErrorTest(SOME_VALID_THREE); |
70 |
| - } |
71 |
| - |
72 |
| - @Test |
73 |
| - void testBareValidOne() { |
74 |
| - CICSTestUtils.noErrorTest(BARE_VALID); |
75 |
| - } |
| 35 | + private static final String INVALID_ONE = "{GETMAIN64|errorOne} SET({$varTwo}) FLENGTH({$varThree}) SHARED"; |
76 | 36 |
|
77 | 37 | @Test
|
78 | 38 | void testInvalidOne() {
|
79 | 39 | Map<String, Diagnostic> expectedDiagnostic =
|
80 | 40 | ImmutableMap.of(
|
81 |
| - "error1", |
| 41 | + "errorOne", |
82 | 42 | new Diagnostic(
|
83 | 43 | new Range(),
|
84 |
| - "Invalid option provided: EXECUTABLE without LOCATION", |
| 44 | + "Invalid option provided: GETMAIN64 is only available in Assembly", |
85 | 45 | DiagnosticSeverity.Error,
|
86 | 46 | ErrorSource.PARSING.getText()));
|
87 | 47 | CICSTestUtils.errorTest(INVALID_ONE, expectedDiagnostic);
|
88 | 48 | }
|
89 |
| - |
90 |
| - @Test |
91 |
| - void testInvalidTwo() { |
92 |
| - Map<String, Diagnostic> expectedDiagnostic = |
93 |
| - ImmutableMap.of( |
94 |
| - "error1", |
95 |
| - new Diagnostic( |
96 |
| - new Range(), |
97 |
| - "Exactly one option required, options are mutually exclusive: USERDATAKEY or CICSDATAKEY", |
98 |
| - DiagnosticSeverity.Error, |
99 |
| - ErrorSource.PARSING.getText())); |
100 |
| - CICSTestUtils.errorTest(INVALID_TWO, expectedDiagnostic); |
101 |
| - } |
102 | 49 | }
|
0 commit comments