blob: 47475c5746610cd53ab768c8ef720265bbd4a527 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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));
}
}
|