Fix logic for identifying test classes on Windows
Use File.separator rather than hard-coding the use of ‘/‘ Closes gh-1571
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.boot.test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@@ -81,7 +82,8 @@ public abstract class AbstractConfigurationClassTests {
|
||||
}
|
||||
|
||||
private boolean isTestClass(Resource resource) throws IOException {
|
||||
return resource.getFile().getAbsolutePath().contains("target/test-classes");
|
||||
return resource.getFile().getAbsolutePath()
|
||||
.contains("target" + File.separator + "test-classes");
|
||||
}
|
||||
|
||||
private boolean isPublic(MethodMetadata methodMetadata) {
|
||||
|
||||
Reference in New Issue
Block a user