Mercurial > hg4j
comparison test/org/tmatesoft/hg/test/Configuration.java @ 388:b015f3918120
Work on FIXME: correct HgDataFile#workingCopy with tests; BasicSessionContext with property override; platform-specific options to internals
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Wed, 15 Feb 2012 22:57:56 +0100 |
parents | 7af843ecc378 |
children | fedc54356091 |
comparison
equal
deleted
inserted
replaced
387:cdea37239b01 | 388:b015f3918120 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2011 TMate Software Ltd | 2 * Copyright (c) 2011-2012 TMate Software Ltd |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or modify | 4 * This program is free software; you can redistribute it and/or modify |
5 * it under the terms of the GNU General Public License as published by | 5 * it under the terms of the GNU General Public License as published by |
6 * the Free Software Foundation; version 2 of the License. | 6 * the Free Software Foundation; version 2 of the License. |
7 * | 7 * |
90 rv.add(lookup.detectRemote(key, null)); | 90 rv.add(lookup.detectRemote(key, null)); |
91 } | 91 } |
92 return rv; | 92 return rv; |
93 } | 93 } |
94 | 94 |
95 /** | |
96 * @return temporary directory to use in tests, may be configured from outside | |
97 */ | |
95 public File getTempDir() { | 98 public File getTempDir() { |
96 if (tempDir == null) { | 99 if (tempDir == null) { |
97 String td = System.getProperty("hg4j.tests.tmpdir", System.getProperty("java.io.tmpdir")); | 100 String td = System.getProperty("hg4j.tests.tmpdir", System.getProperty("java.io.tmpdir")); |
98 tempDir = new File(td); | 101 tempDir = new File(td); |
99 } | 102 } |
100 return tempDir; | 103 return tempDir; |
101 } | 104 } |
102 | 105 |
106 /** | |
107 * @return location with various files used in tests | |
108 */ | |
103 public File getTestDataDir() { | 109 public File getTestDataDir() { |
104 if (testDataDir == null) { | 110 if (testDataDir == null) { |
105 testDataDir = new File(System.getProperty("user.dir"), "test-data"); | 111 testDataDir = new File(System.getProperty("user.dir"), "test-data"); |
106 } | 112 } |
107 return testDataDir; | 113 return testDataDir; |