use of org.apache.geode.management.internal.cli.converters.RegionPathConverter in project geode by apache.
the class GfshParserConverterTest method testRegionPathConverter.
@Test
public void testRegionPathConverter() throws Exception {
RegionPathConverter spy = spyConverter(RegionPathConverter.class);
Set<String> regions = Arrays.stream("/regionA,/regionB".split(",")).collect(Collectors.toSet());
doReturn(regions).when(spy).getAllRegionPaths();
String command = "describe region --name=";
cursor = parser.completeAdvanced(command, candidates);
assertThat(candidates).hasSize(regions.size());
assertThat(getCompleted(command, cursor, candidates.get(0))).isEqualTo(command + "/regionA");
}
Aggregations