Skip to content

Commit

Permalink
Merge pull request #114 from bobwalker99/master
Browse files Browse the repository at this point in the history
Issue 263
  • Loading branch information
mosabua committed Mar 27, 2012
2 parents d36f1b9 + b7c007d commit ea375e1
Showing 1 changed file with 6 additions and 5 deletions.
Expand Up @@ -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));
}

/**
Expand Down

0 comments on commit ea375e1

Please sign in to comment.