Package org.cassandraunit.dataset.json

Examples of org.cassandraunit.dataset.json.ClassPathJsonDataSet


        switch (dataSetExtensionEnum) {
            case xml:
                dataSet = new ClassPathXmlDataSet(dataSetLocation);
                break;
            case json:
                dataSet = new ClassPathJsonDataSet(dataSetLocation);
                break;
            case yaml:
                dataSet = new ClassPathYamlDataSet(dataSetLocation);
                break;
            default:
View Full Code Here


    @Test
    public void shouldParseJsonAndCreateKeyspaceWithComparatorTypeAndMetadatas() throws Exception {
        startEmbeddedCassandra();
        new DataLoader(CassandraUnit.clusterName, CassandraUnit.host)
                .load(new ClassPathJsonDataSet("json/dataSetWithComparatorType.json"));
    }
View Full Code Here

    assertDataSetDefaultValues(dataSet);
  }

  @Test(expected = ParseException.class)
  public void shouldNotGetADataSetStructureBecauseOfNull() {
    DataSet dataSet = new ClassPathJsonDataSet(null);
    dataSet.getKeyspace();
  }
View Full Code Here

    dataSet.getKeyspace();
  }

  @Test(expected = ParseException.class)
  public void shouldNotGetAJsonDataSetStructureBecauseOfDataSetNotExist() {
    DataSet dataSet = new ClassPathJsonDataSet("json/unknown.json");
    dataSet.getKeyspace();
  }
View Full Code Here

    assertDataSetDefaultValues(dataSet);
  }

  @Test(expected = ParseException.class)
  public void shouldNotGetAXmlDataSetStructureBecauseOfDataSetNotExist() {
    DataSet dataSet = new ClassPathJsonDataSet("xml/unknown.xml");
    dataSet.getKeyspace();
  }
View Full Code Here

    assertDataSetDefaultValues(dataSet);
  }

  @Test(expected = ParseException.class)
  public void shouldNotGetAYamlDataSetStructureBecauseOfDataSetNotExist() {
    DataSet dataSet = new ClassPathJsonDataSet("yaml/unknown.yaml");
    dataSet.getKeyspace();
  }
View Full Code Here

                EmbeddedCassandraServerHelper.startEmbeddedCassandra();
                // create structure and load data
                String clusterName = "Tatami cluster";
                String host = "localhost:9171";
                DataLoader dataLoader = new DataLoader(clusterName, host);
                dataLoader.load(new ClassPathJsonDataSet("dataset/dataset.json"));

                final ImmutableSettings.Builder builder = ImmutableSettings.settingsBuilder();
                builder.put("cluster.name", clusterName);

                final Node node = NodeBuilder.nodeBuilder().settings(builder.build()).local(true).node();
View Full Code Here

TOP

Related Classes of org.cassandraunit.dataset.json.ClassPathJsonDataSet

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.