assertThat(actualColumn.getValue().getType(), is(GenericTypeEnum.BYTES_TYPE));
}
@Test
public void shouldGetAJsonDataSetWithDefinedValuesAndData() {
DataSet dataSet = new ClassPathJsonDataSet("json/dataSetDefinedValues.json");
assertThat(dataSet, notNullValue());
KeyspaceModel actualKeyspace = dataSet.getKeyspace();
assertThat(actualKeyspace, notNullValue());
assertThat(actualKeyspace.getName(), is("beautifulDefinedKeyspaceName"));
assertThat(actualKeyspace.getReplicationFactor(), is(1));
assertThat(actualKeyspace.getStrategy(), is(StrategyModel.SIMPLE_STRATEGY));
assertThat(dataSet.getColumnFamilies(), notNullValue());
assertThat(dataSet.getColumnFamilies().size(), is(4));
ColumnFamilyModel actualColumnFamily1 = dataSet.getColumnFamilies().get(0);
assertThat(actualColumnFamily1, notNullValue());
assertThat(actualColumnFamily1.getName(), is("columnFamily1"));
assertThat(actualColumnFamily1.getKeyType().getTypeName(), is(ComparatorType.UTF8TYPE.getTypeName()));
assertThat(actualColumnFamily1.getComparatorType().getTypeName(), is(ComparatorType.UTF8TYPE.getTypeName()));
assertThat(actualColumnFamily1.getSubComparatorType(), is(nullValue()));
assertThat(actualColumnFamily1.getComment(), is("amazing comment"));
assertThat(actualColumnFamily1.getCompactionStrategy(), is("LeveledCompactionStrategy"));
assertThat(actualColumnFamily1.getCompactionStrategyOptions().get(0).getName(), is("sstable_size_in_mb"));
assertThat(actualColumnFamily1.getCompactionStrategyOptions().get(0).getValue(), is("10"));
assertThat(actualColumnFamily1.getGcGraceSeconds(), is(9999));
assertThat(actualColumnFamily1.getMaxCompactionThreshold(), is(31));
assertThat(actualColumnFamily1.getMinCompactionThreshold(), is(3));
assertThat(actualColumnFamily1.getReadRepairChance(), is(0.1d));
assertThat(actualColumnFamily1.getReplicationOnWrite(), is(Boolean.FALSE));
List<RowModel> actualRows1 = actualColumnFamily1.getRows();
assertThat(actualRows1, notNullValue());
assertThat(actualRows1.size(), is(1));
RowModel actualRow11 = actualRows1.get(0);
assertThat(actualRow11, notNullValue());
assertThat(actualRow11.getKey().getValue(), is("key01"));
assertThat(actualRow11.getKey().getType(), is(GenericTypeEnum.UTF_8_TYPE));
List<ColumnModel> actualColumns11 = actualRow11.getColumns();
assertThat(actualColumns11, notNullValue());
assertThat(actualColumns11.size(), is(1));
ColumnModel actualColumn111 = actualColumns11.get(0);
assertThat(actualColumn111, notNullValue());
assertThat(actualColumn111.getName().getValue(), is("columnName1"));
assertThat(actualColumn111.getName().getType(), is(GenericTypeEnum.UTF_8_TYPE));
assertThat(actualColumn111.getValue().getValue(), is("columnValue1"));
assertThat(actualColumn111.getValue().getType(), is(GenericTypeEnum.UTF_8_TYPE));
ColumnFamilyModel actualColumnFamily2 = dataSet.getColumnFamilies().get(1);
assertThat(actualColumnFamily2, notNullValue());
assertThat(actualColumnFamily2.getName(), is("columnFamily2"));
assertThat(actualColumnFamily2.getKeyType().getTypeName(), is(ComparatorType.UTF8TYPE.getTypeName()));
assertThat(actualColumnFamily2.getComparatorType().getTypeName(), is(ComparatorType.UTF8TYPE.getTypeName()));
assertThat(actualColumnFamily2.getSubComparatorType().getTypeName(), is(ComparatorType.UTF8TYPE.getTypeName()));