Search in sources :

Example 11 with TestDatabaseObject

use of com.dailystudio.dataobject.samples.TestDatabaseObject in project devbricks by dailystudio.

the class DatabaseObjectFactoryTest method testCreateDefaultDatabaseObject.

public void testCreateDefaultDatabaseObject() {
    DatabaseObjectFactory factory = DatabaseObjectFactory.getInstance();
    assertNotNull(factory);
    DatabaseObject object1 = null;
    DatabaseObject object2 = null;
    object1 = factory.createObject(new DatabaseObjectCreationParams(null));
    assertNotNull(object1);
    assertEquals(true, object1 instanceof DatabaseObject);
    object2 = factory.createObject(new DatabaseObjectCreationParams(TestDatabaseObject.class));
    assertNotNull(object2);
    assertEquals(false, (object1 == object2));
    assertEquals(true, object2 instanceof TestDatabaseObject);
}
Also used : TestDatabaseObject(com.dailystudio.dataobject.samples.TestDatabaseObject) TestDatabaseObject(com.dailystudio.dataobject.samples.TestDatabaseObject)

Aggregations

TestDatabaseObject (com.dailystudio.dataobject.samples.TestDatabaseObject)11 Intent (android.content.Intent)1 MockCursor (android.test.mock.MockCursor)1 ArrayList (java.util.ArrayList)1