コード例 #1
0
  @Test
  public void should_get_last_clustering_key_name() throws Exception {
    // Given
    when(compoundPKProperties.getClusteringComponents().getCQLComponentNames())
        .thenReturn(Arrays.asList("id", "date", "type"));

    // When
    final String lastClusteringKeyName = view.getLastClusteringKeyName();

    // Then
    assertThat(lastClusteringKeyName).isEqualTo("type");
  }
コード例 #2
0
  @Test
  public void should_get_clustering_key_names() throws Exception {
    // Given
    when(compoundPKProperties.getClusteringComponents().getCQLComponentNames())
        .thenReturn(Arrays.asList("id", "date", "type"));

    // When
    final List<String> clusteringKeysName = view.getClusteringKeysName(2);

    // Then
    assertThat(clusteringKeysName).containsExactly("id", "date");
  }