net.java.ao.test.SqlTracker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of activeobjects-test Show documentation
Show all versions of activeobjects-test Show documentation
This is a library for Active Objects users to depend on for their own testing.
The newest version!
package net.java.ao.test;
import net.java.ao.DatabaseProvider;
import java.util.List;
import static com.google.common.collect.Lists.newLinkedList;
/**
*
*/
public final class SqlTracker implements DatabaseProvider.SqlListener {
private final List sqlStatements = newLinkedList();
public void onSql(String sql) {
sqlStatements.add(sql);
}
public boolean isSqlExecuted() {
return !sqlStatements.isEmpty();
}
}