NumberOfArguments() public method

public NumberOfArguments ( ) : int
return int
        public void Execute()
        {
            AbstractMachineState state = new AbstractMachineState(new AMFactory());
            ArrayList prog = new ArrayList();
            prog.Add(new PutConstantInstruction());
            prog.Add(new HaltInstruction());

            state.Initialize(prog);

            AMProgram program = (AMProgram)state.Program;

            ProgramClause clause = new ProgramClause("male", 2);

            program.AddLabel("male/2", clause);

            ExecuteInstruction i = new ExecuteInstruction();

            object[] args = { "male", "2" };

            i.Process(args);

            i.Execute(state);

            Assert.AreEqual("execute", i.Name());
            Assert.AreEqual(2, i.NumberOfArguments());
            Assert.AreSame(clause, program.P);
        }