AjScript.Tests.Interpreter.ParserTests.ParseIfCommandWithElse C# (CSharp) Method

ParseIfCommandWithElse() private method

private ParseIfCommandWithElse ( ) : void
return void
        public void ParseIfCommandWithElse()
        {
            ICommand command = ParseCommand("if (a<=1) return 1; else return a * (b-1);");

            Assert.IsNotNull(command);
            Assert.IsInstanceOfType(command, typeof(IfCommand));

            IfCommand ifcmd = (IfCommand)command;

            Assert.IsNotNull(ifcmd.Condition);
            Assert.IsNotNull(ifcmd.ThenCommand);
            Assert.IsNotNull(ifcmd.ElseCommand);
        }
ParserTests