1
1
/*
2
- * Copyright 2002-2019 the original author or authors.
2
+ * Copyright 2002-2021 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.
34
34
public class PathEditorTests {
35
35
36
36
@ Test
37
- public void testClasspathPathName () throws Exception {
37
+ public void testClasspathPathName () {
38
38
PropertyEditor pathEditor = new PathEditor ();
39
39
pathEditor .setAsText ("classpath:" + ClassUtils .classPackageAsResourcePath (getClass ()) + "/" +
40
40
ClassUtils .getShortName (getClass ()) + ".class" );
@@ -46,14 +46,14 @@ public void testClasspathPathName() throws Exception {
46
46
}
47
47
48
48
@ Test
49
- public void testWithNonExistentResource () throws Exception {
49
+ public void testWithNonExistentResource () {
50
50
PropertyEditor propertyEditor = new PathEditor ();
51
51
assertThatIllegalArgumentException ().isThrownBy (() ->
52
52
propertyEditor .setAsText ("classpath:/no_way_this_file_is_found.doc" ));
53
53
}
54
54
55
55
@ Test
56
- public void testWithNonExistentPath () throws Exception {
56
+ public void testWithNonExistentPath () {
57
57
PropertyEditor pathEditor = new PathEditor ();
58
58
pathEditor .setAsText ("file:/no_way_this_file_is_found.doc" );
59
59
Object value = pathEditor .getValue ();
@@ -65,7 +65,7 @@ public void testWithNonExistentPath() throws Exception {
65
65
}
66
66
67
67
@ Test
68
- public void testAbsolutePath () throws Exception {
68
+ public void testAbsolutePath () {
69
69
PropertyEditor pathEditor = new PathEditor ();
70
70
pathEditor .setAsText ("/no_way_this_file_is_found.doc" );
71
71
Object value = pathEditor .getValue ();
@@ -77,7 +77,7 @@ public void testAbsolutePath() throws Exception {
77
77
}
78
78
79
79
@ Test
80
- public void testWindowsAbsolutePath () throws Exception {
80
+ public void testWindowsAbsolutePath () {
81
81
PropertyEditor pathEditor = new PathEditor ();
82
82
pathEditor .setAsText ("C:\\ no_way_this_file_is_found.doc" );
83
83
Object value = pathEditor .getValue ();
@@ -89,7 +89,7 @@ public void testWindowsAbsolutePath() throws Exception {
89
89
}
90
90
91
91
@ Test
92
- public void testWindowsAbsoluteFilePath () throws Exception {
92
+ public void testWindowsAbsoluteFilePath () {
93
93
PropertyEditor pathEditor = new PathEditor ();
94
94
pathEditor .setAsText ("file://C:\\ no_way_this_file_is_found.doc" );
95
95
Object value = pathEditor .getValue ();
@@ -101,7 +101,7 @@ public void testWindowsAbsoluteFilePath() throws Exception {
101
101
}
102
102
103
103
@ Test
104
- public void testUnqualifiedPathNameFound () throws Exception {
104
+ public void testUnqualifiedPathNameFound () {
105
105
PropertyEditor pathEditor = new PathEditor ();
106
106
String fileName = ClassUtils .classPackageAsResourcePath (getClass ()) + "/" +
107
107
ClassUtils .getShortName (getClass ()) + ".class" ;
@@ -120,7 +120,7 @@ public void testUnqualifiedPathNameFound() throws Exception {
120
120
}
121
121
122
122
@ Test
123
- public void testUnqualifiedPathNameNotFound () throws Exception {
123
+ public void testUnqualifiedPathNameNotFound () {
124
124
PropertyEditor pathEditor = new PathEditor ();
125
125
String fileName = ClassUtils .classPackageAsResourcePath (getClass ()) + "/" +
126
126
ClassUtils .getShortName (getClass ()) + ".clazz" ;
0 commit comments