View Javadoc
1   /**
2    * Copyright 2011, Aiki IT, FotoRenamer
3    * <p>
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * <p>
8    * http://www.apache.org/licenses/LICENSE-2.0
9    * <p>
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package de.aikiit.fotorenamer;
17  
18  import org.junit.jupiter.api.Disabled;
19  
20  import java.io.File;
21  import java.util.regex.Pattern;
22  
23  /**
24   * This helper class contains relevant constants for testing.
25   *
26   * @author hirsch
27   * @version 2011-06-02, 13:42
28   */
29  @Disabled("Only constants defined here.")
30  public class TestConstants {
31  
32      /**
33       * This is the base name of the image.
34       */
35      public static final String PLAIN_FILE_NAME = "IMG_7559_mini.JPG";
36  
37      /**
38       * Constant to fully qualified directory with all test images.
39       */
40      public static final String FULLPATH_IMAGES = System.getProperty("user.dir")
41              + File.separator + "target" + File.separator + "test-classes"
42              + File.separator + "data" + File.separator;
43  
44      /**
45       * Constant to describe full qualified path to one test image.
46       */
47      public static final String FULLPATH_TEST_IMG = FULLPATH_IMAGES + PLAIN_FILE_NAME;
48  
49      /**
50       * Constant to full qualified picture url after processing.
51       */
52      public static final String FULLPATH_TEST_IMG_RENAMED = FULLPATH_IMAGES + "20110130_131102_" + PLAIN_FILE_NAME;
53  
54      /**
55       * Pattern to match given test image as suffix.
56       */
57      public static final Pattern IS_TEST_FILE = Pattern.compile(".*(" + PLAIN_FILE_NAME + ").*", Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
58  }