1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.eclipse.jetty.server.session.test;
17
18 import java.io.File;
19
20 import org.junit.Assert;
21
22 public class PathAssert
23 {
24 public static void assertDirExists(String msg, File path)
25 {
26 assertExists(msg,path);
27 Assert.assertTrue(msg + " path should be a Dir : " + path.getAbsolutePath(),path.isDirectory());
28 }
29
30 public static void assertFileExists(String msg, File path)
31 {
32 assertExists(msg,path);
33 Assert.assertTrue(msg + " path should be a File : " + path.getAbsolutePath(),path.isFile());
34 }
35
36 public static void assertExists(String msg, File path)
37 {
38 Assert.assertTrue(msg + " path should exist: " + path.getAbsolutePath(),path.exists());
39 }
40 }