001/* 002 * #%L 003 * Netarchivesuite - common - test 004 * %% 005 * Copyright (C) 2005 - 2014 The Royal Danish Library, the Danish State and University Library, 006 * the National Library of France and the Austrian National Library. 007 * %% 008 * This program is free software: you can redistribute it and/or modify 009 * it under the terms of the GNU Lesser General Public License as 010 * published by the Free Software Foundation, either version 2.1 of the 011 * License, or (at your option) any later version. 012 * 013 * This program is distributed in the hope that it will be useful, 014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 016 * GNU General Lesser Public License for more details. 017 * 018 * You should have received a copy of the GNU General Lesser Public 019 * License along with this program. If not, see 020 * <http://www.gnu.org/licenses/lgpl-2.1.html>. 021 * #L% 022 */ 023package dk.netarkivet.common.utils; 024 025import java.io.File; 026import java.util.HashSet; 027import java.util.Set; 028 029import dk.netarkivet.common.distribute.JMSConnectionSunMQ; 030 031public class TestInfo { 032 public static final File BASEDIR = new File("./tests/dk/netarkivet/common/utils"); 033 public static final File TEMPDIR = new File(BASEDIR, "working"); 034 public static final File DATADIR = new File(BASEDIR, "data"); 035 public static final File TESTXML = new File(TEMPDIR, "test.xml"); 036 public static final File NEWXML = new File(TEMPDIR, "savedtest.xml"); 037 public static final File INVALIDXML = new File(TEMPDIR, "invalid.xml"); 038 public static final String SETTINGSFILENAME = new File(TEMPDIR, "settings.xml").getAbsolutePath(); 039 public static final String PORT = JMSConnectionSunMQ.JMS_BROKER_PORT; 040 041 public static final String PORTVALUE = "7676"; 042 public static final String PROCESS_TIMEOUT_VALUE = "5000"; 043 public static final String TIMEOUT = "settings.common.arcrepositoryClient.timeout"; 044 public static final String FIVE_HUNDRED_MEGA_FILE_ZIPPED = "500-mega.zip"; 045 public static final String FIVE_HUNDRED_MEGA_FILE_UNZIPPED = "500-mega"; 046 public static final File MD5_EMPTY_FILE = new File(TEMPDIR, "MD5-empty-file"); 047 public static final String UNUSED_PROPERTY = "settings.never.ever.define.this.property"; 048 049 static final File FILEUTILS_DATADIR = new File(BASEDIR, "fileutils_data"); 050 static final File CDX_FILTER_TEST_DATA_DIR = new File(FILEUTILS_DATADIR, "cdx-filter"); 051 static final Set<String> CDX_FILTER_TEST_CDX_FILES = new HashSet<String>(java.util.Arrays.asList(new String[] { 052 "Reader1.cdx", "Reader2.cdx"})); 053 public static final File XML_FILE_1 = new File(TestInfo.TEMPDIR, "test1.xml"); 054 public static final File XML_FILE_2 = new File(TestInfo.TEMPDIR, "test2.xml"); 055 public static final String XML_FILE_1_XPATH_1 = "/test/file/attachHere"; 056 public static final String LAST_LINE_TEXT = "last line"; 057 public static final File FILE_WITH_NEWLINE_AT_END = new File(TEMPDIR, "newlinedfile.txt"); 058 public static final File FILE_WITH_NO_NEWLINE_AT_END = new File(TEMPDIR, "nonewlinedfile.txt"); 059 public static final File FILE_WITH_ONE_LINE = new File(TEMPDIR, "onelinedfile.txt"); 060 public static final File EMPTY_FILE = new File(TEMPDIR, "emptyfile.txt"); 061 public static final File ZIPDIR = new File(TEMPDIR, "zipdir"); 062 public static final File ZIPPED_DIR = new File(TestInfo.ZIPDIR, "zippedDir.zip"); 063 public static final File ZIPPED_DIR_WITH_SUBDIRS = new File(TestInfo.ZIPDIR, "sub/zippedDirWithSubdirs.zip"); 064 065 public static final File NON_EXISTING_FILE = new File("/no/such/file"); 066 public static final File SETTINGS_FILE = new File(TEMPDIR, "settings.xml"); 067 068}