use of org.activiti.engine.management.TableMetaData in project Activiti by Activiti.
the class ManagementServiceTest method testGetTableMetaData.
public void testGetTableMetaData() {
String tablePrefix = processEngineConfiguration.getDatabaseTablePrefix();
TableMetaData tableMetaData = managementService.getTableMetaData(tablePrefix + "ACT_RU_TASK");
assertThat(tableMetaData.getColumnTypes()).hasSize(tableMetaData.getColumnNames().size());
assertThat(tableMetaData.getColumnNames()).hasSize(22);
int assigneeIndex = tableMetaData.getColumnNames().indexOf("ASSIGNEE_");
int createTimeIndex = tableMetaData.getColumnNames().indexOf("CREATE_TIME_");
assertThat(assigneeIndex).isGreaterThanOrEqualTo(0);
assertThat(createTimeIndex).isGreaterThanOrEqualTo(0);
assertThat(tableMetaData.getColumnTypes().get(assigneeIndex)).isIn("VARCHAR", "NVARCHAR2", "nvarchar", "NVARCHAR");
assertThat(tableMetaData.getColumnTypes().get(createTimeIndex)).isIn("TIMESTAMP", "TIMESTAMP(6)", "datetime", "DATETIME");
}
Aggregations