Search in sources :

Example 1 with DiskStoreNameConverter

use of org.apache.geode.management.internal.cli.converters.DiskStoreNameConverter in project geode by apache.

the class GfshParserConverterTest method testDiskStoreNameConverter.

@Test
public void testDiskStoreNameConverter() throws Exception {
    // spy the DiskStoreNameConverter
    DiskStoreNameConverter spy = spyConverter(DiskStoreNameConverter.class);
    Set<String> diskStores = Arrays.stream("name1,name2".split(",")).collect(Collectors.toSet());
    doReturn(diskStores).when(spy).getDiskStoreNames();
    String command = "compact disk-store --name=";
    cursor = parser.completeAdvanced(command, candidates);
    assertThat(candidates).hasSize(2);
}
Also used : DiskStoreNameConverter(org.apache.geode.management.internal.cli.converters.DiskStoreNameConverter) Test(org.junit.Test) IntegrationTest(org.apache.geode.test.junit.categories.IntegrationTest)

Aggregations

DiskStoreNameConverter (org.apache.geode.management.internal.cli.converters.DiskStoreNameConverter)1 IntegrationTest (org.apache.geode.test.junit.categories.IntegrationTest)1 Test (org.junit.Test)1