@@ -219,7 +219,7 @@ public void testAspectToAasXmlToStdout() {
219
219
}
220
220
221
221
@ Test
222
- public void testAspectToAasAasxToFile () throws TikaException , IOException {
222
+ public void testAspectToAasAasxToFile () {
223
223
final File targetFile = outputFile ( "output.aasx" );
224
224
final ExecutionResult result = sammCli .runAndExpectSuccess ( "--disable-color" , "aspect" , defaultInputFile , "to" , "aas" , "--format" , "aasx" , "-o" ,
225
225
targetFile .getAbsolutePath () );
@@ -230,12 +230,30 @@ public void testAspectToAasAasxToFile() throws TikaException, IOException {
230
230
}
231
231
232
232
@ Test
233
- public void testAspectToAasAasxToStdout () throws TikaException , IOException {
233
+ public void testAspectToAasAasxToStdout () {
234
234
final ExecutionResult result = sammCli .runAndExpectSuccess ( "--disable-color" , "aspect" , defaultInputFile , "to" , "aas" , "--format" , "aasx" );
235
235
assertThat ( result .stderr () ).isEmpty ();
236
236
assertThat ( contentType ( result .stdoutRaw () ) ).isEqualTo ( MediaType .application ( "x-tika-ooxml" ) );
237
237
}
238
238
239
+ @ Test
240
+ public void testAspectToAasJsonToFile () {
241
+ final File targetFile = outputFile ( "output.json" );
242
+ final ExecutionResult result = sammCli .runAndExpectSuccess ( "--disable-color" , "aspect" , defaultInputFile , "to" , "aas" , "--format" , "json" , "-o" ,
243
+ targetFile .getAbsolutePath () );
244
+ assertThat ( result .stdout () ).isEmpty ();
245
+ assertThat ( result .stderr () ).isEmpty ();
246
+ assertThat ( targetFile ).exists ();
247
+ assertThat ( contentType ( targetFile ) ).isEqualTo ( MediaType .text ( "plain" ) );
248
+ }
249
+
250
+ @ Test
251
+ public void testAspectToAasJsonToStdout () {
252
+ final ExecutionResult result = sammCli .runAndExpectSuccess ( "--disable-color" , "aspect" , defaultInputFile , "to" , "aas" , "--format" , "json" );
253
+ assertThat ( result .stderr () ).isEmpty ();
254
+ assertThat ( contentType ( result .stdoutRaw () ) ).isEqualTo ( MediaType .text ( "plain" ) );
255
+ }
256
+
239
257
@ Test
240
258
public void testAspectToDotWithDefaultLanguage () {
241
259
final File targetFile = outputFile ( "output.dot" );
@@ -585,7 +603,7 @@ public void testAspectToOpenApiWithResourcePathAndCustomResolver() {
585
603
}
586
604
587
605
@ Test
588
- public void testAspectToPngWithDefaultLanguage () throws TikaException , IOException {
606
+ public void testAspectToPngWithDefaultLanguage () {
589
607
final File targetFile = outputFile ( "output.png" );
590
608
final ExecutionResult result = sammCli .runAndExpectSuccess ( "--disable-color" , "aspect" , defaultInputFile , "to" , "png" , "-o" ,
591
609
targetFile .getAbsolutePath () );
@@ -596,7 +614,7 @@ public void testAspectToPngWithDefaultLanguage() throws TikaException, IOExcepti
596
614
}
597
615
598
616
@ Test
599
- public void testAspectToPngWithGivenLanguage () throws TikaException , IOException {
617
+ public void testAspectToPngWithGivenLanguage () {
600
618
final File targetFile = outputFile ( "output.png" );
601
619
final ExecutionResult result = sammCli .runAndExpectSuccess ( "--disable-color" , "aspect" , defaultInputFile , "to" , "png" , "-o" ,
602
620
targetFile .getAbsolutePath (),
@@ -619,7 +637,7 @@ public void testAspectToPngWithNonExistentLanguage() {
619
637
}
620
638
621
639
@ Test
622
- public void testAspectToPngToStdout () throws TikaException , IOException {
640
+ public void testAspectToPngToStdout () {
623
641
final ExecutionResult result = sammCli .runAndExpectSuccess ( "--disable-color" , "aspect" , defaultInputFile , "to" , "png" );
624
642
assertThat ( result .stderr () ).isEmpty ();
625
643
assertThat ( contentType ( result .stdoutRaw () ) ).isEqualTo ( MediaType .image ( "png" ) );
0 commit comments