use of org.activityinfo.shared.dto.SchemaDTO in project activityinfo by bedatadriven.
the class LocalGetSchemaHandlerIntTest method forDatabaseOwner.
@Test
@OnDataSet("/dbunit/sites-simple1.db.xml")
public void forDatabaseOwner() throws CommandException {
synchronizeFirstTime();
SchemaDTO schema = executeLocally(new GetSchema());
assertThat(schema.getDatabases().size(), equalTo(3));
assertThat(schema.getDatabaseById(1).isDesignAllowed(), equalTo(true));
assertThat(schema.getDatabaseById(1).getAmOwner(), equalTo(true));
assertThat(schema.getDatabaseById(2).getAmOwner(), equalTo(true));
assertThat(schema.getDatabaseById(1).getOwnerName(), equalTo("Alex"));
}
Aggregations