mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Added ActionBarSherlock library compatiblity support
This commit is contained in:
parent
f4fe37cee6
commit
6d105f4844
374 changed files with 34299 additions and 25 deletions
|
|
@ -0,0 +1,39 @@
|
|||
package com.actionbarsherlock.internal;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static com.actionbarsherlock.internal.ActionBarSherlockCompat.cleanActivityName;
|
||||
import com.xtremelabs.robolectric.RobolectricTestRunner;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@RunWith(RobolectricTestRunner.class)
|
||||
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));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue