use of com.orm.androrm.statement.Statement in project androrm by androrm.
the class OrStatementTest method testSimpleOr.
public void testSimpleOr() {
Statement left = new Statement("foo", "bar");
Statement right = new Statement("bar", "baz");
OrStatement or = new OrStatement(left, right);
assertEquals("(foo = 'bar' OR bar = 'baz')", or.toString());
}
use of com.orm.androrm.statement.Statement in project androrm by androrm.
the class StatementTest method testPlainStatement.
public void testPlainStatement() {
Statement stmt = new Statement("foo", "bar");
assertEquals("foo = 'bar'", stmt.toString());
}
use of com.orm.androrm.statement.Statement in project androrm by androrm.
the class StatementTest method testGetKeys.
public void testGetKeys() {
Statement stmt = new Statement("foo", "bar");
Set<String> keys = stmt.getKeys();
assertEquals(keys.size(), 1);
assertTrue(keys.contains("foo"));
}
use of com.orm.androrm.statement.Statement in project androrm by androrm.
the class AndStatementTest method testGetKey.
public void testGetKey() {
AndStatement and = new AndStatement(new Statement("foo", "bar"), new Statement("bar", "baz"));
Set<String> keys = and.getKeys();
assertEquals(2, keys.size());
assertTrue(keys.contains("foo"));
assertTrue(keys.contains("bar"));
}
use of com.orm.androrm.statement.Statement in project androrm by androrm.
the class AndStatementTest method testSimpleAnd.
public void testSimpleAnd() {
Statement left = new Statement("foo", "bar");
Statement right = new Statement("bar", "baz");
AndStatement and = new AndStatement(left, right);
assertEquals("foo = 'bar' AND bar = 'baz'", and.toString());
}
Aggregations