Assert author email address
authorReto Buerki <reet@codelabs.ch>
Tue, 20 Mar 2012 12:27:49 +0000 (13:27 +0100)
committerReto Buerki <reet@codelabs.ch>
Tue, 20 Mar 2012 12:27:49 +0000 (13:27 +0100)
src/ch/codelabs/gitter/test/CommitDbAdapterTest.java

index 4ff8993..67295c6 100644 (file)
@@ -35,12 +35,13 @@ public class CommitDbAdapterTest extends AndroidTestCase {
         */
        public void testInsertCommit() {
                final String testHash = "abca3c29b985d90f271c7b9ea9f095729759799c";
+               final String testMail = "doe@example.com";
                final CommitDbAdapter commitDbAdapter = new CommitDbAdapter(
                                getContext());
                commitDbAdapter.open();
 
                final long id = commitDbAdapter.insertCommit("Update TODO", testHash,
-                               "John Doe doe@example.com", "http://1.com/abc", "testdata");
+                               "John Doe", testMail, "http://1.com/abc", "testdata");
 
                final Cursor c = commitDbAdapter.fetchAllCommits();
                assertTrue(c.getCount() > 0);
@@ -52,8 +53,10 @@ public class CommitDbAdapterTest extends AndroidTestCase {
                                c.getInt(c.getColumnIndexOrThrow(CommitDbAdapter.KEY_READ)));
                assertEquals("Update TODO",
                                c.getString(c.getColumnIndexOrThrow(CommitDbAdapter.KEY_TITLE)));
-               assertEquals("John Doe doe@example.com", c.getString(c
+               assertEquals("John Doe", c.getString(c
                                .getColumnIndexOrThrow(CommitDbAdapter.KEY_AUTHOR)));
+               assertEquals(testMail, c.getString(c
+                               .getColumnIndexOrThrow(CommitDbAdapter.KEY_EMAIL)));
                assertEquals("http://1.com/abc", c.getString(c
                                .getColumnIndexOrThrow(CommitDbAdapter.KEY_DIFFLINK)));
                assertEquals("testdata", c.getString(c