1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.commons.imaging.formats.jpeg.xmp;
19
20 import static org.junit.jupiter.api.Assertions.assertNotNull;
21
22 import java.io.File;
23 import java.util.stream.Stream;
24
25 import org.apache.commons.imaging.bytesource.ByteSource;
26 import org.apache.commons.imaging.formats.jpeg.JpegImageParser;
27 import org.apache.commons.imaging.formats.jpeg.JpegImagingParameters;
28 import org.junit.jupiter.params.ParameterizedTest;
29 import org.junit.jupiter.params.provider.MethodSource;
30
31 public class JpegXmpDumpTest extends AbstractJpegXmpTest {
32
33 public static Stream<File> data() throws Exception {
34 return getImagesWithXmpData().stream();
35 }
36
37 @ParameterizedTest
38 @MethodSource("data")
39 public void test(final File imageFile) throws Exception {
40 final ByteSource byteSource = ByteSource.file(imageFile);
41 final JpegImagingParameters params = new JpegImagingParameters();
42 final String xmpXml = new JpegImageParser().getXmpXml(byteSource, params);
43
44
45 assertNotNull(xmpXml);
46 }
47
48 }