Package org.cassandraunit.dataset.commons

Examples of org.cassandraunit.dataset.commons.ParsedKeyspace


            throw new ParseException("Dataset not found in classpath");
        }

        Yaml yaml = new Yaml();
        try {
            ParsedKeyspace keyspace = yaml.loadAs(inputDataSetLocation, ParsedKeyspace.class);
            return keyspace;
        } catch (YAMLException e) {
            throw new ParseException(e);
        }
    }
View Full Code Here


  @Test
  public void shouldGenerateAYamlDataSet() throws Exception {
    Yaml yaml = new Yaml();

    ParsedKeyspace keyspace = new ParsedKeyspace();
    keyspace.setName("beautifulKeyspaceName");
    keyspace.setReplicationFactor(1);

    List<ParsedColumnFamily> columnFamilies = new ArrayList<ParsedColumnFamily>();
    columnFamilies.add(constructSuperColumnFamily());
    keyspace.setColumnFamilies(columnFamilies);

    String result = yaml.dump(keyspace);
    log.debug(result);

  }
View Full Code Here

  private Logger log = LoggerFactory.getLogger(JsonDataSetExampleTest.class);

  @Test
  public void shouldGenerateAJsonDataSetDocument() throws JAXBException {

    ParsedKeyspace keyspace = new ParsedKeyspace();
    keyspace.setName("beautifulKeyspaceName");
    keyspace.setReplicationFactor(1);
    List<ParsedColumnFamily> columnFamilies = keyspace.getColumnFamilies();

    ParsedColumnFamily columnFamily1 = new ParsedColumnFamily();
    columnFamily1.setName("columnFamily1");
    columnFamily1.setType(ColumnType.STANDARD);
    columnFamily1.setKeyType("UTF8Type");
View Full Code Here

  private ParsedKeyspace pks;

  public ManualDataSet(String keyspaceName) {
    this.keyspaceName = keyspaceName;

    pks = new ParsedKeyspace();
    pks.setName(this.keyspaceName);
  }
View Full Code Here

TOP

Related Classes of org.cassandraunit.dataset.commons.ParsedKeyspace

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.