test for CommitListActivity
authorMartin Kempf <mkempf@hsr.ch>
Wed, 14 Mar 2012 14:46:37 +0000 (15:46 +0100)
committerMartin Kempf <mkempf@hsr.ch>
Wed, 14 Mar 2012 14:46:37 +0000 (15:46 +0100)
src/ch/codelabs/gitter/test/CommitListActivityTest.java [new file with mode: 0644]

diff --git a/src/ch/codelabs/gitter/test/CommitListActivityTest.java b/src/ch/codelabs/gitter/test/CommitListActivityTest.java
new file mode 100644 (file)
index 0000000..39936c0
--- /dev/null
@@ -0,0 +1,43 @@
+package ch.codelabs.gitter.test;
+
+import android.test.ActivityInstrumentationTestCase2;
+import android.widget.TextView;
+import ch.codelabs.gitter.CommitListActivity;
+
+public class CommitListActivityTest extends
+               ActivityInstrumentationTestCase2<CommitListActivity> {
+
+       private CommitListActivity mActivity;
+       private TextView mView;
+       private String resourceString;
+
+       public CommitListActivityTest() {
+               super("ch.codelabs.gitter", CommitListActivity.class);
+       }
+
+       public CommitListActivityTest(String pkg,
+                       Class<CommitListActivity> activityClass) {
+               super(pkg, activityClass);
+       }
+
+       @Override
+       protected void setUp() throws Exception {
+               super.setUp();
+               mActivity = this.getActivity();
+               mView = (TextView) mActivity
+                               .findViewById(ch.codelabs.gitter.R.id.textCommitTitel);
+               resourceString = mActivity
+                               .getString(ch.codelabs.gitter.R.string.no_commits);
+       }
+
+       public void testPreconditions() {
+               assertNotNull(mView);
+       }
+
+//     public void testText() {
+//             assertEquals(resourceString, (String) mView.getText());
+//     }
+
+
+
+}