public void Execute()
        {
            int cnt = 1;
            var task = new VariableArgumentTask<int> (2, (a) => cnt += a.Length);

            try {
                task.Execute ();
                Assert.Fail ("#1");
            } catch (NullReferenceException) {}

            task [0] = new PortElement<int> (10);
            try {
                task.Execute ();
                Assert.Fail ("#2");
            } catch (NullReferenceException) {}

            task [1] = new PortElement<int> (20);
            Assert.IsNull (task.Execute (), "#3");
            Assert.AreEqual (3, cnt, "#4");
        }
        public void ExecuteWithBoundFirstArg()
        {
            double cntA = 1;
            int cntB = 1;
            var task = new VariableArgumentTask<double, int> (1, (a, b) => { cntA += a; cntB += b.Length; });

            task [0] = new PortElement <double> (4);
            task [1] = new PortElement <int> (2);
            Assert.IsNull (task.Execute (), "#1");
            Assert.AreEqual (5, cntA, "#2");
            Assert.AreEqual (2, cntB, "#3");
        }