mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-26 01:28:50 -05:00
37 lines
1.3 KiB
Java
37 lines
1.3 KiB
Java
|
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));
|
||
|
}
|
||
|
}
|