@@ -39,8 +39,7 @@ public void testClasspathPathName() {
3939 pathEditor .setAsText ("classpath:" + ClassUtils .classPackageAsResourcePath (getClass ()) + "/" +
4040 ClassUtils .getShortName (getClass ()) + ".class" );
4141 Object value = pathEditor .getValue ();
42- boolean condition = value instanceof Path ;
43- assertThat (condition ).isTrue ();
42+ assertThat (value instanceof Path ).isTrue ();
4443 Path path = (Path ) value ;
4544 assertThat (path .toFile ().exists ()).isTrue ();
4645 }
@@ -57,47 +56,39 @@ public void testWithNonExistentPath() {
5756 PropertyEditor pathEditor = new PathEditor ();
5857 pathEditor .setAsText ("file:/no_way_this_file_is_found.doc" );
5958 Object value = pathEditor .getValue ();
60- boolean condition1 = value instanceof Path ;
61- assertThat (condition1 ).isTrue ();
59+ assertThat (value instanceof Path ).isTrue ();
6260 Path path = (Path ) value ;
63- boolean condition = !path .toFile ().exists ();
64- assertThat (condition ).isTrue ();
61+ assertThat (!path .toFile ().exists ()).isTrue ();
6562 }
6663
6764 @ Test
6865 public void testAbsolutePath () {
6966 PropertyEditor pathEditor = new PathEditor ();
7067 pathEditor .setAsText ("/no_way_this_file_is_found.doc" );
7168 Object value = pathEditor .getValue ();
72- boolean condition1 = value instanceof Path ;
73- assertThat (condition1 ).isTrue ();
69+ assertThat (value instanceof Path ).isTrue ();
7470 Path path = (Path ) value ;
75- boolean condition = !path .toFile ().exists ();
76- assertThat (condition ).isTrue ();
71+ assertThat (!path .toFile ().exists ()).isTrue ();
7772 }
7873
7974 @ Test
8075 public void testWindowsAbsolutePath () {
8176 PropertyEditor pathEditor = new PathEditor ();
8277 pathEditor .setAsText ("C:\\ no_way_this_file_is_found.doc" );
8378 Object value = pathEditor .getValue ();
84- boolean condition1 = value instanceof Path ;
85- assertThat (condition1 ).isTrue ();
79+ assertThat (value instanceof Path ).isTrue ();
8680 Path path = (Path ) value ;
87- boolean condition = !path .toFile ().exists ();
88- assertThat (condition ).isTrue ();
81+ assertThat (!path .toFile ().exists ()).isTrue ();
8982 }
9083
9184 @ Test
9285 public void testWindowsAbsoluteFilePath () {
9386 PropertyEditor pathEditor = new PathEditor ();
9487 pathEditor .setAsText ("file://C:\\ no_way_this_file_is_found.doc" );
9588 Object value = pathEditor .getValue ();
96- boolean condition1 = value instanceof Path ;
97- assertThat (condition1 ).isTrue ();
89+ assertThat (value instanceof Path ).isTrue ();
9890 Path path = (Path ) value ;
99- boolean condition = !path .toFile ().exists ();
100- assertThat (condition ).isTrue ();
91+ assertThat (!path .toFile ().exists ()).isTrue ();
10192 }
10293
10394 @ Test
@@ -107,8 +98,7 @@ public void testUnqualifiedPathNameFound() {
10798 ClassUtils .getShortName (getClass ()) + ".class" ;
10899 pathEditor .setAsText (fileName );
109100 Object value = pathEditor .getValue ();
110- boolean condition = value instanceof Path ;
111- assertThat (condition ).isTrue ();
101+ assertThat (value instanceof Path ).isTrue ();
112102 Path path = (Path ) value ;
113103 File file = path .toFile ();
114104 assertThat (file .exists ()).isTrue ();
@@ -126,8 +116,7 @@ public void testUnqualifiedPathNameNotFound() {
126116 ClassUtils .getShortName (getClass ()) + ".clazz" ;
127117 pathEditor .setAsText (fileName );
128118 Object value = pathEditor .getValue ();
129- boolean condition = value instanceof Path ;
130- assertThat (condition ).isTrue ();
119+ assertThat (value instanceof Path ).isTrue ();
131120 Path path = (Path ) value ;
132121 File file = path .toFile ();
133122 assertThat (file .exists ()).isFalse ();
0 commit comments