コード例 #1
0
 @After
 @SuppressForbidden(reason = "resets java.io.tmpdir")
 public void tearDown() throws Exception {
   System.setProperty("java.io.tmpdir", javaIoTmpdir);
   PathUtilsForTesting.teardown();
   super.tearDown();
 }
コード例 #2
0
 @SuppressForbidden(reason = "sets java.io.tmpdir")
 public InstallPluginCommandTests(FileSystem fs, Function<String, Path> temp) {
   this.fs = fs;
   this.temp = temp;
   this.isPosix = fs.supportedFileAttributeViews().contains("posix");
   this.isReal = fs == PathUtils.getDefaultFileSystem();
   PathUtilsForTesting.installMock(fs);
   javaIoTmpdir = System.getProperty("java.io.tmpdir");
   System.setProperty("java.io.tmpdir", temp.apply("tmpdir").toString());
 }