1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.onehippo.forge.gallerymagick.core.command;
17
18 import java.io.File;
19 import java.net.URISyntaxException;
20 import java.util.ArrayList;
21 import java.util.List;
22
23
24
25
26 abstract public class AbstractMagickCommandTest {
27
28 protected static final String [] DEFAULT_TEST_IMAGE_FILE_EXTENSIONS = { "jpg", "png", "gif", "bmp", "tiff" };
29
30 private List<File> testImageFiles;
31
32 protected String [] getTestImageFileExtensions() {
33 return DEFAULT_TEST_IMAGE_FILE_EXTENSIONS;
34 }
35
36 protected List<File> getTestImageFiles() throws URISyntaxException {
37 if (testImageFiles == null) {
38 testImageFiles = new ArrayList<>();
39
40 for (String extension : getTestImageFileExtensions()) {
41 testImageFiles.add(new File(AbstractMagickCommandTest.class.getResource("/hippo." + extension).toURI()));
42 }
43 }
44
45 return testImageFiles;
46 }
47
48 }