Ejemplo n.º 1
0
 public void RegisterBothCommandAndAlias()
 {
     var registry = new CommandRegistry();
     registry.Register(new HelpCommand());
     registry.Register(new HelpCommand(), "h");
     Assert.AreEqual(2, registry.Commands.Count);
     Assert.IsTrue(registry.Contains("help"));
     Assert.IsTrue(registry.Contains("h"));
 }
Ejemplo n.º 2
0
 public void RegisterOne()
 {
     var registry = new CommandRegistry();
     registry.Register(new HelpCommand());
     Assert.AreEqual(1, registry.Commands.Count);
     Assert.IsTrue(registry.Contains("help"));
 }