diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-05-25 22:48:11 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2013-05-25 22:48:11 +0200 |
commit | 23caec047182a85869f56c9ca0ae9125227734fc (patch) | |
tree | 983cf4d11a667cfb5caeb062da847e92f5f7885b /libraries/ActionBarSherlock/test | |
parent | 9744b569ab7eda549e01cff685aa1b1d171cc28e (diff) | |
download | open-keychain-23caec047182a85869f56c9ca0ae9125227734fc.tar.gz open-keychain-23caec047182a85869f56c9ca0ae9125227734fc.tar.bz2 open-keychain-23caec047182a85869f56c9ca0ae9125227734fc.zip |
move ActionBarSherlock lib, add gradle build files
Diffstat (limited to 'libraries/ActionBarSherlock/test')
-rw-r--r-- | libraries/ActionBarSherlock/test/com/actionbarsherlock/internal/ManifestParsingTest.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/libraries/ActionBarSherlock/test/com/actionbarsherlock/internal/ManifestParsingTest.java b/libraries/ActionBarSherlock/test/com/actionbarsherlock/internal/ManifestParsingTest.java new file mode 100644 index 000000000..47475c574 --- /dev/null +++ b/libraries/ActionBarSherlock/test/com/actionbarsherlock/internal/ManifestParsingTest.java @@ -0,0 +1,37 @@ +package com.actionbarsherlock.internal; + +import org.junit.Test; + +import static com.actionbarsherlock.internal.ActionBarSherlockCompat.cleanActivityName; +import static org.hamcrest.CoreMatchers.equalTo; +import static org.junit.Assert.assertThat; + +public class ManifestParsingTest { + @Test + public void testFullyQualifiedClassName() { + String expected = "com.other.package.SomeClass"; + String actual = cleanActivityName("com.jakewharton.test", "com.other.package.SomeClass"); + assertThat(expected, equalTo(actual)); + } + + @Test + public void testFullyQualifiedClassNameSamePackage() { + String expected = "com.jakewharton.test.SomeClass"; + String actual = cleanActivityName("com.jakewharton.test", "com.jakewharton.test.SomeClass"); + assertThat(expected, equalTo(actual)); + } + + @Test + public void testUnqualifiedClassName() { + String expected = "com.jakewharton.test.SomeClass"; + String actual = cleanActivityName("com.jakewharton.test", "SomeClass"); + assertThat(expected, equalTo(actual)); + } + + @Test + public void testRelativeClassName() { + String expected = "com.jakewharton.test.ui.SomeClass"; + String actual = cleanActivityName("com.jakewharton.test", ".ui.SomeClass"); + assertThat(expected, equalTo(actual)); + } +}
\ No newline at end of file |