Exemple #1
0
        public void CanPushString()
        {
            ParserParameter param = new ParserNamedParameter("Name", false);
            ParseResult result = new ParseResult();
            result.AddCommandValue(param, "value");

            var pusher = new CommandPusher(result);

            var command = new StringCommand();

            pusher.Push(command);

            command.Name.ShouldBe("value");
        }
Exemple #2
0
        public void CanPushBool()
        {
            ParserParameter param = new ParserNamedParameter("Add", true);
            ParseResult result = new ParseResult();
            result.AddCommandValue(param, "true");

            var pusher = new CommandPusher(result);

            var command = new BoolCommand();

            pusher.Push(command);

            command.Add.ShouldBe(true);
        }