use of android.content.ContentValues in project k-9 by k9mail.
the class MigrationMimeStructureStateTest method init_apply_apply_shouldCrash.
@Test(expected = IllegalStateException.class)
public void init_apply_apply_shouldCrash() throws Exception {
MimeStructureState state = MimeStructureState.getNewRootState();
ContentValues cv = new ContentValues();
state.applyValues(cv);
state.applyValues(cv);
}
use of android.content.ContentValues in project k-9 by k9mail.
the class StoreSchemaDefinitionTest method insertMessageWithSubject.
private void insertMessageWithSubject(SQLiteDatabase database, String subject) {
ContentValues data = new ContentValues();
data.put("subject", subject);
long rowId = database.insert("messages", null, data);
assertNotEquals(-1, rowId);
}
use of android.content.ContentValues in project k-9 by k9mail.
the class MigrationMimeStructureStateTest method init_apply_nextmulti_apply_shouldYieldMultipartChildValues.
@Test
public void init_apply_nextmulti_apply_shouldYieldMultipartChildValues() throws Exception {
MimeStructureState state = MimeStructureState.getNewRootState();
ContentValues cv = new ContentValues();
state.applyValues(cv);
state = state.nextMultipartChild(123);
cv.clear();
state.applyValues(cv);
Assert.assertEquals(123L, cv.get("root"));
Assert.assertEquals(123L, cv.get("parent"));
Assert.assertEquals(1, cv.get("seq"));
Assert.assertEquals(3, cv.size());
}
use of android.content.ContentValues in project k-9 by k9mail.
the class MigrationMimeStructureStateTest method init_apply_nextmulti_apply_pop_apply_shouldYieldFirstParentIdValues.
@Test
public void init_apply_nextmulti_apply_pop_apply_shouldYieldFirstParentIdValues() throws Exception {
MimeStructureState state = MimeStructureState.getNewRootState();
ContentValues cv = new ContentValues();
state.applyValues(cv);
state = state.nextMultipartChild(123);
cv.clear();
state.applyValues(cv);
state = state.nextMultipartChild(456);
state = state.popParent();
cv.clear();
state.applyValues(cv);
Assert.assertEquals(123L, cv.get("root"));
Assert.assertEquals(123L, cv.get("parent"));
Assert.assertEquals(2, cv.get("seq"));
Assert.assertEquals(3, cv.size());
}
use of android.content.ContentValues in project k-9 by k9mail.
the class MigrationMimeStructureStateTest method init_apply_nextmulti_nextchild_shouldCrash.
@Test(expected = IllegalStateException.class)
public void init_apply_nextmulti_nextchild_shouldCrash() throws Exception {
MimeStructureState state = MimeStructureState.getNewRootState();
ContentValues cv = new ContentValues();
state.applyValues(cv);
state.nextMultipartChild(1);
state.nextChild(1);
}
Aggregations