use of com.orm.androrm.field.IntegerField in project androrm by androrm.
the class IntegerFieldTest method testDefauls.
public void testDefauls() {
IntegerField i = new IntegerField();
assertEquals("`foo` integer", i.getDefinition("foo"));
assertTrue(0 == i.get());
}
use of com.orm.androrm.field.IntegerField in project androrm by androrm.
the class IntegerFieldTest method testMods.
public void testMods() {
IntegerField i = new IntegerField(0);
assertEquals("`foo` integer", i.getDefinition("foo"));
i = new IntegerField(17);
assertEquals("`foo` integer", i.getDefinition("foo"));
i = new IntegerField(10);
assertEquals("`foo` integer(10)", i.getDefinition("foo"));
}
use of com.orm.androrm.field.IntegerField in project androrm by androrm.
the class TableDefinitionTest method testAddSimpleField.
public void testAddSimpleField() {
TableDefinition def = new TableDefinition("foo");
IntegerField i = new IntegerField();
def.addField("pk", i);
assertEquals("CREATE TABLE IF NOT EXISTS `foo` (`pk` integer);", def.toString());
}
use of com.orm.androrm.field.IntegerField in project androrm by androrm.
the class IntegerFieldTest method testReset.
public void testReset() {
IntegerField i = new IntegerField();
i.set(123);
assertTrue(123 == i.get());
i.reset();
assertTrue(0 == i.get());
}
use of com.orm.androrm.field.IntegerField in project androrm by androrm.
the class IntegerFieldTest method testSetAndGet.
public void testSetAndGet() {
IntegerField i = new IntegerField();
i.set(123);
assertTrue(123 == i.get());
}
Aggregations