Examples of CQLDataSet


Examples of org.cassandraunit.dataset.CQLDataSet

  }

  @Test
  public void shouldGetACQLDataSet() {

    CQLDataSet dataSet = new FileCQLDataSet(super.targetDataSetPathFileName);
    assertThat(dataSet, notNullValue());
  }
View Full Code Here

Examples of org.cassandraunit.dataset.CQLDataSet

  }

  @Test
  public void shouldNotGetACQLDataSetBecauseNull() {
    try {
      CQLDataSet dataSet = new FileCQLDataSet(null);
      fail();
    } catch (ParseException e) {
      /* nothing to do, it what we want */
    }
  }
 
View Full Code Here

Examples of org.cassandraunit.dataset.CQLDataSet

  }

  @Test
  public void shouldNotGetACQLDataSetBecauseOfFileNotFound() {
    try {
      CQLDataSet dataSet = new FileCQLDataSet("/notfound.cql");
      fail();
    } catch (ParseException e) {
      /* nothing to do, it what we want */
    }
  }
 
View Full Code Here

Examples of org.cassandraunit.dataset.CQLDataSet

public class ClasspathCQLDataSetTest {

    @Test
    public void shouldGetACQLDataSet() {

        CQLDataSet dataSet = new ClassPathCQLDataSet("cql/simple.cql");
        assertThat(dataSet, notNullValue());
    }
View Full Code Here

Examples of org.cassandraunit.dataset.CQLDataSet

    }

    @Test
    public void shouldNotGetACQLDataSetBecauseNull() {
        try {
            CQLDataSet dataSet = new ClassPathCQLDataSet(null);
            fail();
        } catch (ParseException e) {
            /* nothing to do, it what we want */
        }
    }
View Full Code Here

Examples of org.cassandraunit.dataset.CQLDataSet

    }

    @Test
    public void shouldNotGetACQLDataSetBecauseItNotExist() {
        try {
            CQLDataSet dataSet = new ClassPathCQLDataSet("cql/unknownDataSet.cql");
            fail();
        } catch (ParseException e) {
            /* nothing to do, it what we want */
        }
    }
View Full Code Here

Examples of org.cassandraunit.dataset.CQLDataSet

        }
    }

    @Test
    public void shouldGetCQLQueries() {
        CQLDataSet dataSet = new ClassPathCQLDataSet("cql/simple.cql");
        assertThat(dataSet.getCQLStatements(), notNullValue());
        assertThat(dataSet.getCQLStatements().isEmpty(), is(false));
        assertThat(dataSet.getCQLStatements().size(),is(4));
        assertThat(dataSet.getCQLStatements().get(0),is("CREATE TABLE testCQLTable (id uuid, value varchar, PRIMARY KEY(id));"));
        assertThat(dataSet.getCQLStatements().get(1),is("INSERT INTO testCQLTable(id, value) values(1690e8da-5bf8-49e8-9583-4dff8a570737,'Cql loaded string');"));
        assertThat(dataSet.getCQLStatements().get(2),is("INSERT INTO testCQLTable(id, value) values(1690e8da-5bf8-49e8-9583-4dff8a570738,'BLA2');"));
        assertThat(dataSet.getCQLStatements().get(3),is("INSERT INTO testCQLTable(id, value) values(1690e8da-5bf8-49e8-9583-4dff8a570739,'BLA1');"));
    }
View Full Code Here

Examples of org.cassandraunit.dataset.CQLDataSet

    }


    @Test
    public void shouldGetDefinedTestKeyspaceName() {
        CQLDataSet dataSet = new ClassPathCQLDataSet("cql/simple.cql", "mykeyspace");
        assertThat(dataSet.getKeyspaceName(),is("mykeyspace"));
    }
View Full Code Here

Examples of org.cassandraunit.dataset.CQLDataSet

        assertThat(dataSet.getKeyspaceName(),is("mykeyspace"));
    }

    @Test
    public void shouldGetCQLQueriesFromMultiLineCQLScript() {
        CQLDataSet dataSet = new ClassPathCQLDataSet("cql/multiLineStatements.cql");
        assertThat(dataSet.getCQLStatements(), notNullValue());
        assertThat(dataSet.getCQLStatements().isEmpty(), is(false));
        assertThat(dataSet.getCQLStatements().size(),is(4));
        assertThat(dataSet.getCQLStatements().get(0),is("CREATE TABLE testCQLTable ( id uuid, value varchar, PRIMARY KEY(id) );"));
        assertThat(dataSet.getCQLStatements().get(1),is("INSERT INTO testCQLTable(id, value) values(1690e8da-5bf8-49e8-9583-4dff8a570737,'Cql loaded string');"));
        assertThat(dataSet.getCQLStatements().get(2),is("INSERT INTO testCQLTable( id,value ) values( 1690e8da-5bf8-49e8-9583-4dff8a570738, 'BLA2' );"));
        assertThat(dataSet.getCQLStatements().get(3),is("INSERT INTO testCQLTable(id, value) values(1690e8da-5bf8-49e8-9583-4dff8a570739,'BLA1');"));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.