Esempio n. 1
0
        public void TestHasEndCommand()
        {
            //setup
            BaseExecuteCommand command1 = new ExecuteAt(new SharpCraft.Selector())
            {
                ExecuteCommand = new ExecuteAlign(true, true, true)
                {
                    ExecuteCommand = new SayCommand("hello")
                }
            };
            BaseExecuteCommand command2 = new ExecuteAt(new SharpCraft.Selector())
            {
                ExecuteCommand = new ExecuteAlign(true, true, true)
                {
                    ExecuteCommand = new ExecuteAs(ID.Selector.a)
                }
            };

            //test
            Assert.IsTrue(command1.HasEndCommand(), "HasEndCommand doesn't see the end command");
            Assert.IsFalse(command2.HasEndCommand(), "HasEndCommand doesn't see that the last command is an execute command");
        }