Ejemplo n.º 1
0
        public void TestClearSecondaryArguments_Null()
        {
            MethodDeclarationNode mdn = new MethodDeclarationNode("foo");

            mdn.ClearSecondaryArguments();
            Assert.IsNotNull(mdn.SecondaryArguments);
            Assert.AreEqual(0, mdn.SecondaryArguments.Count);
        }
Ejemplo n.º 2
0
        public void TestClearSecondaryArguments_Null_ExistingArgs()
        {
            MethodDeclarationNode   mdn = new MethodDeclarationNode("MyMethod");
            VariableDeclarationNode vdn = new VariableDeclarationNode("foo");

            mdn.AddSecondaryArgument(vdn, new WordNode("to", PartOfSpeechTag.Preposition));
            Assert.AreEqual(1, mdn.SecondaryArguments.Count);
            mdn.ClearSecondaryArguments();
            Assert.AreEqual(0, mdn.SecondaryArguments.Count);
        }
Ejemplo n.º 3
0
 public void TestClearSecondaryArguments_Null_ExistingArgs() {
     MethodDeclarationNode mdn = new MethodDeclarationNode("MyMethod");
     VariableDeclarationNode vdn = new VariableDeclarationNode("foo");
     mdn.AddSecondaryArgument(vdn, new WordNode("to", PartOfSpeechTag.Preposition));
     Assert.AreEqual(1, mdn.SecondaryArguments.Count);
     mdn.ClearSecondaryArguments();
     Assert.AreEqual(0, mdn.SecondaryArguments.Count);
 }
Ejemplo n.º 4
0
 public void TestClearSecondaryArguments_Null() {
     MethodDeclarationNode mdn = new MethodDeclarationNode("foo");
     mdn.ClearSecondaryArguments();
     Assert.IsNotNull(mdn.SecondaryArguments);
     Assert.AreEqual(0, mdn.SecondaryArguments.Count);
 }