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);
}
Aggregations