Example #1
0
        public void changeClientName()
        {
            string newName = ts + "0";

            CommandHolder.updateCommand(ts, ts, true);
            CommandHolder.changeClientID(ts, newName);
            Assert.DoesNotThrow(() => CommandHolder.getCommandEnabled(newName, ts));
            Assert.True(CommandHolder.getCommandEnabled(newName, ts));
            Assert.DoesNotThrow(() => CommandHolder.updateCommand(newName, ts, false));
            Assert.False(CommandHolder.getCommandEnabled(newName, ts));
        }
Example #2
0
 public void nameChangeNullThrows()
 {
     Assert.Throws <NullReferenceException>(() => CommandHolder.changeClientID(ts, null));
     Assert.Throws <NullReferenceException>(() => CommandHolder.changeClientID(null, ts));
 }