fix crash on re-export of fdo50057-2.odt to odt
[LibreOffice.git] / android / abs-lib / test / com / actionbarsherlock / internal / ManifestParsingTest.java
blob1314248a45ec280b9d4148ac35fd9f3745bfdb73
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;
7 import org.junit.Test;
8 import org.junit.runner.RunWith;
10 @RunWith(RobolectricTestRunner.class)
11 public class ManifestParsingTest {
12 @Test
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));
19 @Test
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));
26 @Test
27 public void testUnqualifiedClassName() {
28 String expected = "com.jakewharton.test.SomeClass";
29 String actual = cleanActivityName("com.jakewharton.test", "SomeClass");
30 assertThat(expected, equalTo(actual));
33 @Test
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));