dataSet.getKeyspace();
}
@Test
public void shouldGetAColumnFamilyWithSecondaryIndex() {
DataSet dataSet = new ClassPathJsonDataSet("json/dataSetWithSecondaryIndex.json");
ColumnMetadataModel actualColumnMetadataModel1 = dataSet.getColumnFamilies().get(0).getColumnsMetadata().get(0);
assertThat(actualColumnMetadataModel1.getColumnName().getValue(), is("columnWithIndexAndUTF8ValidationClass"));
assertThat(actualColumnMetadataModel1.getColumnIndexType(), is(ColumnIndexType.KEYS));
assertThat(actualColumnMetadataModel1.getValidationClass(), is(ComparatorType.UTF8TYPE));
ColumnMetadataModel actualColumnMetadataModel2 = dataSet.getColumnFamilies().get(0).getColumnsMetadata().get(1);
assertThat(actualColumnMetadataModel2.getColumnName().getValue(), is("columnWithIndexAndIndexNameAndUTF8ValidationClass"));
assertThat(actualColumnMetadataModel2.getColumnIndexType(), is(ColumnIndexType.KEYS));
assertThat(actualColumnMetadataModel2.getValidationClass(), is(ComparatorType.UTF8TYPE));
assertThat(actualColumnMetadataModel2.getIndexName(), is("indexNameOfTheIndex"));
ColumnMetadataModel actualColumnMetadataModel3 = dataSet.getColumnFamilies().get(0).getColumnsMetadata().get(2);
assertThat(actualColumnMetadataModel3.getColumnName().getValue(), is("columnWithUTF8ValidationClass"));
assertThat(actualColumnMetadataModel3.getColumnIndexType(), nullValue());
assertThat(actualColumnMetadataModel3.getValidationClass(), is(ComparatorType.UTF8TYPE));
}