Skip to content

Commit ce7d4b9

Browse files
committed
Fix some tests
1 parent 0ca0638 commit ce7d4b9

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎AndroidAnnotations/androidannotations/src/test/java/org/androidannotations/generation/SharedPrefsApiDependenciesTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ public void setup() {
6565
}
6666

6767
@Test
68-
public void shared_prefs_generate_api_dependencies() throws IOException {
68+
public void class_with_prefs_do_not_generate_api_dependencies() throws IOException {
6969
compileFiles(SharedPrefs.class);
7070
for (Class<?> apiDependency : SHARED_PREF_API_DEPENDENCIES) {
71-
assertClassSourcesGeneratedToOutput(apiDependency);
71+
assertClassSourcesNotGeneratedToOutput(apiDependency);
7272
}
7373
}
7474

‎AndroidAnnotations/functional-test-1-5-tests/src/test/java/org/androidannotations/test15/EmptyActivityWithLayoutTest.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ public class EmptyActivityWithLayoutTest {
2727
public void shouldHaveLayoutAfterCreate() {
2828
EmptyActivityWithLayout_ activity = new EmptyActivityWithLayout_();
2929

30-
assertThat(activity.findViewById(R.id.helloTextView)).isNull();
31-
3230
activity.onCreate(null);
31+
activity.setContentView(R.layout.main);
3332

3433
assertThat(activity.findViewById(R.id.helloTextView)).hasId(R.id.helloTextView);
3534
}

‎AndroidAnnotations/functional-test-1-5-tests/src/test/java/org/androidannotations/test15/EmptyActivityWithoutLayoutTest.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@
2020
import org.junit.Test;
2121
import org.junit.runner.RunWith;
2222

23+
import android.view.View;
24+
2325
@RunWith(AndroidAnnotationsTestRunner.class)
2426
public class EmptyActivityWithoutLayoutTest {
2527

2628
@Test
2729
public void shouldHaveNoLayoutAfterCreate() {
2830
EmptyActivityWithoutLayout_ activity = new EmptyActivityWithoutLayout_();
2931

30-
assertThat(activity.findViewById(R.id.helloTextView)).isNull();
31-
3232
activity.onCreate(null);
33+
activity.setContentView(new View(activity));
3334

3435
assertThat(activity.findViewById(R.id.helloTextView)).isNull();
3536
}

0 commit comments

Comments
 (0)