@@ -56,12 +56,13 @@ public class DicomWebTests {
56
56
private static String dicomStoreName ;
57
57
private static String datasetName ;
58
58
59
- // The studyUid is not assigned by the server and is part of the metadata of dcmFile.
59
+ // The studyUid is not assigned by the server and is part of the metadata of
60
+ // dcmFile.
60
61
private static String studyId = "2.25.330012077234033941963257891139480825153" ;
61
62
private static String seriesId = "2.25.143186483950719304925806365081717734297" ;
62
63
private static String instanceId = "2.25.195151962645072062560826889007364152748" ;
63
- private static String dicomWebInstancePath =
64
- String . format ( "studies/%s/series/%s/instances/%s" , studyId , seriesId , instanceId );
64
+ private static String dicomWebInstancePath = String . format ( "studies/%s/series/%s/instances/%s" ,
65
+ studyId , seriesId , instanceId );
65
66
private static String dicomWebRenderedPath = dicomWebInstancePath + "/rendered" ;
66
67
67
68
private static String instanceOutput = "instance.dcm" ;
@@ -88,8 +89,8 @@ public static void checkRequirements() {
88
89
@ BeforeClass
89
90
public static void setUp () throws IOException {
90
91
String datasetId = "dataset-" + UUID .randomUUID ().toString ().replaceAll ("-" , "_" );
91
- datasetName =
92
- String . format ( "projects/%s/locations/%s/datasets/%s" , PROJECT_ID , REGION_ID , datasetId );
92
+ datasetName = String . format ( "projects/%s/locations/%s/datasets/%s" ,
93
+ PROJECT_ID , REGION_ID , datasetId );
93
94
DatasetCreate .datasetCreate (PROJECT_ID , REGION_ID , datasetId );
94
95
95
96
String dicomStoreId = "dicom-" + UUID .randomUUID ().toString ().replaceAll ("-" , "_" );
@@ -108,9 +109,6 @@ public void beforeTest() throws IOException, URISyntaxException {
108
109
bout = new ByteArrayOutputStream ();
109
110
System .setOut (new PrintStream (bout ));
110
111
111
- // Store DICOM instance before each test so it is always available.
112
- DicomWebStoreInstance .dicomWebStoreInstance (dicomStoreName , "src/test/resources/jpeg_text.dcm" );
113
-
114
112
bout = new ByteArrayOutputStream ();
115
113
System .setOut (new PrintStream (bout ));
116
114
}
@@ -122,29 +120,29 @@ public void tearDown() {
122
120
}
123
121
124
122
@ Test
125
- public void test_DicomWebStoreInstance () throws Exception {
123
+ public void testA_DicomWebStoreInstance () throws Exception {
126
124
DicomWebStoreInstance .dicomWebStoreInstance (dicomStoreName , "src/test/resources/jpeg_text.dcm" );
127
125
128
126
String output = bout .toString ();
129
127
assertThat (output , containsString ("DICOM instance stored:" ));
130
128
}
131
129
132
130
@ Test
133
- public void test_DicomWebSearchInstances () throws Exception {
131
+ public void testB_DicomWebSearchInstances () throws Exception {
134
132
DicomWebSearchForInstances .dicomWebSearchForInstances (dicomStoreName );
135
133
String output = bout .toString ();
136
134
assertThat (output , containsString ("Dicom store instances found:" ));
137
135
}
138
136
139
137
@ Test
140
- public void test_DicomWebSearchStudies () throws Exception {
138
+ public void testC_DicomWebSearchStudies () throws Exception {
141
139
DicomWebSearchStudies .dicomWebSearchStudies (dicomStoreName );
142
140
String output = bout .toString ();
143
141
assertThat (output , containsString ("Studies found:" ));
144
142
}
145
143
146
144
@ Test
147
- public void test_DicomWebRetrieveStudy () throws Exception {
145
+ public void testD_DicomWebRetrieveStudy () throws Exception {
148
146
DicomWebRetrieveStudy .dicomWebRetrieveStudy (dicomStoreName , studyId );
149
147
150
148
outputFile = new File (studyOutput );
@@ -155,7 +153,7 @@ public void test_DicomWebRetrieveStudy() throws Exception {
155
153
}
156
154
157
155
@ Test
158
- public void test_DicomWebRetrieveInstance () throws Exception {
156
+ public void testE_DicomWebRetrieveInstance () throws Exception {
159
157
DicomWebRetrieveInstance .dicomWebRetrieveInstance (dicomStoreName , dicomWebInstancePath );
160
158
161
159
outputFile = new File (instanceOutput );
@@ -166,7 +164,7 @@ public void test_DicomWebRetrieveInstance() throws Exception {
166
164
}
167
165
168
166
@ Test
169
- public void test_DicomWebRetrieveRendered () throws Exception {
167
+ public void testF_DicomWebRetrieveRendered () throws Exception {
170
168
DicomWebRetrieveRendered .dicomWebRetrieveRendered (dicomStoreName , dicomWebRenderedPath );
171
169
172
170
outputFile = new File (renderedOutput );
@@ -180,8 +178,7 @@ public void test_DicomWebRetrieveRendered() throws Exception {
180
178
// Test order is NAME_ASCENDING, so ensure that we delete the DICOM study
181
179
// last, otherwise it might run before DicomWebRetrieve methods
182
180
// (see https://github.com/GoogleCloudPlatform/java-docs-samples/issues/3845).
183
- @ SuppressWarnings ("checkstyle:MethodName" )
184
- public void z_test_DicomWebDeleteStudy () throws IOException {
181
+ public void testZ_DicomWebDeleteStudy () throws IOException {
185
182
DicomWebDeleteStudy .dicomWebDeleteStudy (dicomStoreName , studyId );
186
183
187
184
String output = bout .toString ();
0 commit comments