|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2012 the original author or authors. |
| 2 | + * Copyright 2002-2015 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
40 | 40 | * @author Philippe Marschall
|
41 | 41 | * @author Phillip Webb
|
42 | 42 | * @author Nicholas Williams
|
| 43 | + * @author Juergen Hoeller |
43 | 44 | */
|
44 | 45 | public class PathResourceTests {
|
45 | 46 |
|
46 |
| - private static final String TEST_DIR = platformPath("src/test/java/org/" |
47 |
| - + "springframework/core/io"); |
| 47 | + private static final String TEST_DIR = |
| 48 | + platformPath("src/test/java/org/springframework/core/io"); |
48 | 49 |
|
49 |
| - private static final String TEST_FILE = platformPath("src/test/java/org/" |
50 |
| - + "springframework/core/io/example.properties"); |
| 50 | + private static final String TEST_FILE = |
| 51 | + platformPath("src/test/java/org/springframework/core/io/example.properties"); |
51 | 52 |
|
52 |
| - private static final String NON_EXISTING_FILE = platformPath("src/test/java/org/" |
53 |
| - + "springframework/core/io/doesnotexist.properties"); |
| 53 | + private static final String NON_EXISTING_FILE = |
| 54 | + platformPath("src/test/java/org/springframework/core/io/doesnotexist.properties"); |
54 | 55 |
|
55 | 56 |
|
56 | 57 | private static String platformPath(String string) {
|
@@ -222,7 +223,7 @@ public void contentLengthForDirectory() throws Exception {
|
222 | 223 | public void lastModified() throws Exception {
|
223 | 224 | PathResource resource = new PathResource(TEST_FILE);
|
224 | 225 | File file = new File(TEST_FILE);
|
225 |
| - assertThat(resource.lastModified(), equalTo(file.lastModified())); |
| 226 | + assertThat(resource.lastModified() / 1000, equalTo(file.lastModified() / 1000)); |
226 | 227 | }
|
227 | 228 |
|
228 | 229 | @Test
|
|
0 commit comments