AjScript.Tests.Interpreter.ParserTests.ParseIfCommandWithElse C# (CSharp) Méthode

ParseIfCommandWithElse() private méthode

private ParseIfCommandWithElse ( ) : void
Résultat 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