コード例 #1
0
        public void gntRawTest1()
        {
            var target = new NuGetComponent();

            try {
                target.parse("[NuGet gnt.raw()]");
                Assert.Fail("1");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(InvalidArgumentException), ex.GetType().ToString()); }

            try {
                target.parse("[NuGet gnt.raw(\"the is not a correct command\")]");
                Assert.Fail("2");
            }
            catch(System.Exception) {
                Assert.IsTrue(true); // should be any exception from gnt.core as normal behavior
            }
        }
コード例 #2
0
        public void gntTest1()
        {
            var target = new NuGetComponent();

            try {
                target.parse("[NuGet gnt]");
                Assert.Fail("1");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[NuGet gnt()]");
                Assert.Fail("2");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }

            try {
                target.parse("[NuGet gnt.NotRealNode]");
                Assert.Fail("3");
            }
            catch(Exception ex) { Assert.IsTrue(ex.GetType() == typeof(IncorrectNodeException), ex.GetType().ToString()); }
        }
コード例 #3
0
 public void parseTest1()
 {
     var target = new NuGetComponent();
     target.parse("[NuGet NotRealSubtype.check]");
 }