Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <activity android:name=".CreateActivity"
- android:label="Create Password"
- >
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.VIEW"/>
- <category android:name="android.intent.category.DEFAULT"></category>
- <category android:name="android.intent.category.BROWSABLE"></category>
- <data
- android:host="sample-app-123.appspot.com"
- android:scheme="https"
- android:pathPattern=".*create_password.*"
- />
- </intent-filter>
- </activity>
- <activity android:name=".ResetActivity"
- android:label="Reset Password"
- >
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.VIEW"/>
- <category android:name="android.intent.category.DEFAULT"></category>
- <category android:name="android.intent.category.BROWSABLE"></category>
- <data
- android:host="sample-app-123.appspot.com"
- android:scheme="https"
- android:pathPattern=".*reset_password.*"
- />
- </intent-filter>
- </activity>
- public void testPatternMatcher() throws Exception {
- PatternMatcher mPatternMatcher;
- mPatternMatcher = new PatternMatcher("https://sample-app-123.appspot.com/backoffice\/#\/user_create_password.*", PatternMatcher.PATTERN_SIMPLE_GLOB);
- assertTrue(mPatternMatcher.match("https://sample-app-123.appspot.com/backoffice/#/user_create_password?email=abc@gmail.com"));
- assertFalse(mPatternMatcher.match("https://sample-app-123.appspot.com/backoffice/#/user_reset_password?email=abc@gmail.com"));
- mPatternMatcher = new PatternMatcher(".*user_create_password.*", PatternMatcher.PATTERN_SIMPLE_GLOB);
- assertTrue(mPatternMatcher.match("https://sample-app-123.appspot.com/backoffice/#/user_create_password?email=abc@gmail.com"));
- assertFalse(mPatternMatcher.match("https://sample-app-123.appspot.com/backoffice/#/user_reset_password?email=abc@gmail.com"));
- mPatternMatcher = new PatternMatcher(".*user_reset_password.*", PatternMatcher.PATTERN_SIMPLE_GLOB);
- assertFalse(mPatternMatcher.match("/backoffice/#/user_create_password?email=abc@gmail.com"));
- assertTrue(mPatternMatcher.match("/backoffice/#/user_reset_password?email=abc@gmail.com"));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement