Add automatic command grouping

Fixes #163

Introduce Command and Command.Help
This commit is contained in:
Eric Bottard
2017-09-27 10:49:12 +02:00
parent 531dc35abe
commit f0e5c45ee9
16 changed files with 404 additions and 53 deletions

View File

@@ -27,6 +27,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.shell.Command;
import org.springframework.shell.ConfigurableCommandRegistry;
import org.springframework.shell.MethodTarget;
import org.springframework.shell.MethodTargetRegistrar;
@@ -56,7 +57,7 @@ public class LegacyMethodTargetRegistrarTest {
assertThat(targets).contains(entry(
"register module",
MethodTarget.of("register", legacyCommands, "Register a new module")
MethodTarget.of("register", legacyCommands, new Command.Help("Register a new module"))
));
}