Package org.cassandraunit.model

Examples of org.cassandraunit.model.ColumnModel


    public void shouldGetBinaryData() {
        DataSet dataSet = new ClassPathYamlDataSet("yaml/dataSetWithBinaryData.yaml");
        ColumnFamilyModel columnFamilyModel = dataSet.getColumnFamilies().get(0);
        assertThat(columnFamilyModel.getName(), is("columnFamilyWithBinaryData"));
        List<ColumnModel> columns = columnFamilyModel.getRows().get(0).getColumns();
        ColumnModel column1 = columns.get(0);
        assertThat(column1.getName().getValue(), is("a"));
        assertThat(column1.getValue().getValue(), is("aGVsbG8gd29ybGQh"));
        assertThat(column1.getValue().getType(), is(GenericTypeEnum.BYTES_TYPE));

        ColumnModel column2 = columns.get(1);
        assertThat(column2.getName().getValue(), is("b"));
        assertThat(column2.getValue().getValue(), is("aGVsbG8gd29ybGQh"));
        assertThat(column2.getValue().getType(), is(GenericTypeEnum.BYTES_TYPE));

        ColumnModel column3 = columns.get(2);
        assertThat(column3.getName().getValue(), is("c"));
        assertThat(column3.getValue().getValue(), is("aGVsbG8gd29ybGQh"));
        assertThat(column3.getValue().getType(), is(GenericTypeEnum.BYTES_TYPE));
    }
View Full Code Here

TOP

Related Classes of org.cassandraunit.model.ColumnModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.