6
6
import java .nio .file .Paths ;
7
7
8
8
import static org .junit .jupiter .api .Assertions .assertEquals ;
9
- import static org .junit .jupiter .api .Assertions .assertNull ;
9
+ import static org .junit .jupiter .api .Assertions .assertNotNull ;
10
10
11
11
/**
12
12
* Tests for the ComponentClassTest class.
@@ -28,8 +28,8 @@ public void testGetComponentNoneUNK() throws URISyntaxException {
28
28
componentIdentifier );
29
29
String resultCategory = instance .getCategoryStr ();
30
30
String resultComponent = instance .getComponentStr ();
31
- assertEquals (resultComponent , "Unknown" );
32
- assertEquals (resultCategory , "None" );
31
+ assertEquals ("Unknown" , resultComponent );
32
+ assertEquals ("None" , resultCategory );
33
33
}
34
34
35
35
/**
@@ -44,8 +44,8 @@ public void testGetComponentNoneOther() throws URISyntaxException {
44
44
.getResource (JSON_FILE ).toURI ()), componentIdentifier );
45
45
String resultCategory = instance .getCategoryStr ();
46
46
String resultComponent = instance .getComponentStr ();
47
- assertEquals (resultComponent , "Unknown" );
48
- assertEquals (resultCategory , "None" );
47
+ assertEquals ("Unknown" , resultComponent );
48
+ assertEquals ("None" , resultCategory );
49
49
}
50
50
51
51
/**
@@ -60,8 +60,8 @@ public void testGetComponentBlank() throws URISyntaxException {
60
60
.getResource (JSON_FILE ).toURI ()), componentIdentifier );
61
61
String resultCategory = instance .getCategoryStr ();
62
62
String resultComponent = instance .getComponentStr ();
63
- assertEquals (resultComponent , "Unknown" );
64
- assertEquals (resultCategory , "None" );
63
+ assertEquals ("Unknown" , resultComponent );
64
+ assertEquals ("None" , resultCategory );
65
65
}
66
66
67
67
/**
@@ -76,8 +76,8 @@ public void testGetComponentNFEx() throws URISyntaxException {
76
76
.getResource (JSON_FILE ).toURI ()), componentIdentifier );
77
77
String resultCategory = instance .getCategoryStr ();
78
78
String resultComponent = instance .getComponentStr ();
79
- assertEquals (resultComponent , "Unknown" );
80
- assertEquals (resultCategory , "None" );
79
+ assertEquals ("Unknown" , resultComponent );
80
+ assertEquals ("None" , resultCategory );
81
81
}
82
82
83
83
/**
@@ -92,8 +92,8 @@ public void testGetComponentNull() throws URISyntaxException {
92
92
.getResource (JSON_FILE ).toURI ()), componentIdentifier );
93
93
String resultCategory = instance .getCategoryStr ();
94
94
String resultComponent = instance .getComponentStr ();
95
- assertEquals (resultComponent , "Unknown" );
96
- assertEquals (resultCategory , "None" );
95
+ assertEquals ("Unknown" , resultComponent );
96
+ assertEquals ("None" , resultCategory );
97
97
}
98
98
99
99
/**
@@ -108,8 +108,8 @@ public void testGetComponentStandardQueryTCG() throws URISyntaxException {
108
108
.getResource (JSON_FILE ).toURI ()), componentIdentifier );
109
109
String resultCategory = instance .getCategoryStr ();
110
110
String resultComponent = instance .getComponentStr ();
111
- assertEquals (resultComponent , "SAS Bridgeboard" );
112
- assertEquals (resultCategory , "Modules" );
111
+ assertEquals ("SAS Bridgeboard" , resultComponent );
112
+ assertEquals ("Modules" , resultCategory );
113
113
}
114
114
115
115
/**
@@ -140,8 +140,8 @@ public void testGetComponentStandardQueryIntTCG() throws URISyntaxException {
140
140
.getResource (JSON_FILE ).toURI ()), componentIdentifier );
141
141
String resultCategory = instance .getCategoryStr ();
142
142
String resultComponent = instance .getComponentStr ();
143
- assertEquals (resultComponent , "SAS Bridgeboard" );
144
- assertEquals (resultCategory , "Modules" );
143
+ assertEquals ("SAS Bridgeboard" , resultComponent );
144
+ assertEquals ("Modules" , resultCategory );
145
145
}
146
146
147
147
/**
@@ -236,8 +236,8 @@ public void testGetComponentNonStandardQuery() throws URISyntaxException {
236
236
.getResource (JSON_FILE ).toURI ()), componentIdentifier );
237
237
String resultCategory = instance .getCategoryStr ();
238
238
String resultComponent = instance .getComponentStr ();
239
- assertEquals (resultComponent , "SAS Bridgeboard" );
240
- assertEquals (resultCategory , "Modules" );
239
+ assertEquals ("SAS Bridgeboard" , resultComponent );
240
+ assertEquals ("Modules" , resultCategory );
241
241
}
242
242
243
243
/**
@@ -252,8 +252,8 @@ public void testGetComponentNonStandardQuery2() throws URISyntaxException {
252
252
.getResource (JSON_FILE ).toURI ()), componentIdentifier );
253
253
String resultCategory = instance .getCategoryStr ();
254
254
String resultComponent = instance .getComponentStr ();
255
- assertEquals (resultComponent , "SAS Bridgeboard" );
256
- assertEquals (resultCategory , "Modules" );
255
+ assertEquals ("SAS Bridgeboard" , resultComponent );
256
+ assertEquals ("Modules" , resultCategory );
257
257
}
258
258
259
259
/**
@@ -268,8 +268,9 @@ public void testGetComponentNonExistentValue() throws URISyntaxException {
268
268
.getResource (JSON_FILE ).toURI ()), componentIdentifier );
269
269
String resultCategory = instance .getCategoryStr ();
270
270
String resultComponent = instance .getComponentStr ();
271
- assertNull (resultComponent );
272
- assertEquals (resultCategory , "Modules" );
271
+ assertNotNull (resultComponent );
272
+ assertEquals ("Unknown" , resultComponent );
273
+ assertEquals ("Modules" , resultCategory );
273
274
}
274
275
275
276
/**
@@ -284,8 +285,9 @@ public void testGetComponentNonExistentValue2() throws URISyntaxException {
284
285
.getResource (JSON_FILE ).toURI ()), componentIdentifier );
285
286
String resultCategory = instance .getCategoryStr ();
286
287
String resultComponent = instance .getComponentStr ();
287
- assertNull (resultComponent );
288
- assertEquals (resultCategory , "Modules" );
288
+ assertNotNull (resultComponent );
289
+ assertEquals ("Unknown" , resultComponent );
290
+ assertEquals ("Modules" , resultCategory );
289
291
}
290
292
291
293
/**
@@ -300,7 +302,7 @@ public void testGetComponentNonExistentCategory() throws URISyntaxException {
300
302
.getResource (JSON_FILE ).toURI ()), componentIdentifier );
301
303
String resultCategory = instance .getCategoryStr ();
302
304
String resultComponent = instance .getComponentStr ();
303
- assertEquals (resultComponent , "Unknown" );
304
- assertEquals (resultCategory , "None" );
305
+ assertEquals ("Unknown" , resultComponent );
306
+ assertEquals ("None" , resultCategory );
305
307
}
306
308
}
0 commit comments