use of com.vodafone360.people.datatypes.ActivityItem.Flag in project 360-Engine-for-Android by 360.
the class NowPlusStateTableTest method testMeProfileChangeFlag.
/*
* modify and fetch Me profile change flag
*/
public void testMeProfileChangeFlag() {
final String fnName = "testMeProfileChangeFlag";
mTestStep = 1;
Log.i(LOG_TAG, "***** EXECUTING " + fnName + "*****");
Log.i(LOG_TAG, "modify and fetching change flag");
SQLiteDatabase writableDb = mTestDatabase.getWritableDatabase();
SQLiteDatabase readableDb = mTestDatabase.getReadableDatabase();
boolean myContactChanged = TestModule.generateRandomBoolean();
ServiceStatus status = StateTable.modifyMeProfileChangedFlag(myContactChanged, writableDb);
assertEquals(ServiceStatus.ERROR_DATABASE_CORRUPT, status);
boolean fetchMeProfileChangedFlag = StateTable.fetchMeProfileChangedFlag(readableDb);
assertFalse(fetchMeProfileChangedFlag);
createTable();
fetchMeProfileChangedFlag = StateTable.fetchMeProfileChangedFlag(readableDb);
assertFalse(fetchMeProfileChangedFlag);
status = StateTable.modifyMeProfileChangedFlag(myContactChanged, writableDb);
assertEquals(ServiceStatus.SUCCESS, status);
fetchMeProfileChangedFlag = StateTable.fetchMeProfileChangedFlag(readableDb);
assertEquals(myContactChanged, fetchMeProfileChangedFlag);
Log.i(LOG_TAG, "*************************************");
Log.i(LOG_TAG, "modify and fetching MeProfile change flag has completed successfully");
Log.i(LOG_TAG, "**************************************");
}
Aggregations