Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #114 from bobwalker99/master

Issue 263
  • Loading branch information...
commit ea375e1e7b39389db639b345226c7cba60dba915 2 parents d36f1b9 + b7c007d
@mosabua mosabua authored
View
11 src/test/java/com/jayway/maven/plugins/android/AndroidSdkTest.java
@@ -81,12 +81,13 @@ public void givenPlatform1dot5ThenPlatformis1dot5() throws IllegalAccessExceptio
@Test
public void givenPlatformNullThenPlatformisSomethingValidLooking() throws IllegalAccessException, URISyntaxException {
- final File path = (File) ReflectionUtils.getValueIncludingSuperclasses("sdkPath",sdkTestSupport.getSdk_with_platform_default());
+ final File sdkPath = (File) ReflectionUtils.getValueIncludingSuperclasses("sdkPath",sdkTestSupport.getSdk_with_platform_default());
final File platform = sdkTestSupport.getSdk_with_platform_default().getPlatform();
- final String platformPath = platform.getAbsolutePath();
- final String pathPath = path.getAbsolutePath();
- final String regex = new File(pathPath + "/platforms/android-.*").toURI().toString();
- Assert.assertTrue(new File(platformPath).toURI().toString().matches(regex));
+ final String platformPath = platform.getAbsoluteFile().toURI().toString();
+ final String regex = "/platforms/android-.*";
+ //Strip off the sdkPath part
+ String matcher = platformPath.substring( sdkPath.toURI().toString().length() -1 );
+ Assert.assertTrue(String.format("Platform [%s] does not match regex: [%s]", matcher,regex), matcher.matches(regex));
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.