1 package com
.actionbarsherlock
.internal
;
3 import static org
.hamcrest
.CoreMatchers
.equalTo
;
4 import static org
.junit
.Assert
.assertThat
;
5 import static com
.actionbarsherlock
.internal
.ActionBarSherlockCompat
.cleanActivityName
;
6 import com
.xtremelabs
.robolectric
.RobolectricTestRunner
;
8 import org
.junit
.runner
.RunWith
;
10 @RunWith(RobolectricTestRunner
.class)
11 public class ManifestParsingTest
{
13 public void testFullyQualifiedClassName() {
14 String expected
= "com.other.package.SomeClass";
15 String actual
= cleanActivityName("com.jakewharton.test", "com.other.package.SomeClass");
16 assertThat(expected
, equalTo(actual
));
20 public void testFullyQualifiedClassNameSamePackage() {
21 String expected
= "com.jakewharton.test.SomeClass";
22 String actual
= cleanActivityName("com.jakewharton.test", "com.jakewharton.test.SomeClass");
23 assertThat(expected
, equalTo(actual
));
27 public void testUnqualifiedClassName() {
28 String expected
= "com.jakewharton.test.SomeClass";
29 String actual
= cleanActivityName("com.jakewharton.test", "SomeClass");
30 assertThat(expected
, equalTo(actual
));
34 public void testRelativeClassName() {
35 String expected
= "com.jakewharton.test.ui.SomeClass";
36 String actual
= cleanActivityName("com.jakewharton.test", ".ui.SomeClass");
37 assertThat(expected
, equalTo(actual
));