Exemplo n.º 1
0
        public void WorksWithSingleValueString()
        {
            string    s = "Hi";
            MacroItem m = new MacroItem(s);

            Assert.IsTrue(m.Label == "Hi");
            Assert.IsTrue(m.CommandList.Count == 0);
            Assert.IsTrue(m.ToString() == "Hi,");
        }
Exemplo n.º 2
0
        public void WorksWithBlankString()
        {
            string    s = string.Empty;
            MacroItem m = new MacroItem(s);

            Assert.IsTrue(m.Label == string.Empty);
            Assert.IsTrue(m.CommandList.Count == 0);
            Assert.IsTrue(m.ToString() == ",");
        }
Exemplo n.º 3
0
        public void WorksWithSingleCommandString()
        {
            string    s = "Hi,Command1";
            MacroItem m = new MacroItem(s);

            Assert.IsTrue(m.Label == "Hi");
            Assert.IsTrue(m.CommandList.Count == 1);
            Assert.IsTrue(m.CommandList[0] == "Command1");
            Assert.IsTrue(m.ToString() == s);
        }
Exemplo n.º 4
0
        public void WhitespaceAndCRLFAreDropped()
        {
            string    s = "Hi,Command1,, ,\r,\n,\r\n, \r\n,Command2,Command3";
            MacroItem m = new MacroItem(s);

            Assert.IsTrue(m.Label == "Hi");
            Assert.IsTrue(m.CommandList.Count == 3);
            Assert.IsTrue(m.CommandList[0] == "Command1");
            Assert.IsTrue(m.CommandList[1] == "Command2");
            Assert.IsTrue(m.CommandList[2] == "Command3");
            Assert.IsTrue(m.ToString() == "Hi,Command1,Command2,Command3");
        }
Exemplo n.º 5
0
        public void WorksWithMultipleCommandString()
        {
            string    s = "Hi,Command1,Command2,Command3";
            MacroItem m = new MacroItem(s);

            Assert.IsTrue(m.Label == "Hi");
            Assert.IsTrue(m.CommandList.Count == 3);
            Assert.IsTrue(m.CommandList[0] == "Command1");
            Assert.IsTrue(m.CommandList[1] == "Command2");
            Assert.IsTrue(m.CommandList[2] == "Command3");
            Assert.IsTrue(m.ToString() == s);
        }