public void TestPreviewAndFinishPendingConnection()
        {
            TestableOutput   output  = new TestableOutput();
            TestableInput    input   = new TestableInput();
            NetworkViewModel network = new NetworkViewModel
            {
                Nodes =
                {
                    new NodeViewModel
                    {
                        Outputs ={ output               }
                    },
                    new NodeViewModel
                    {
                        Inputs ={ input                }
                    }
                }
            };

            output.CreatePendingConnection_public();
            input.SetConnectionPreview_public(true);

            Assert.AreEqual(input, network.PendingConnection.Input);

            input.FinishPendingConnection_public();

            Assert.AreEqual(null, network.PendingConnection);

            Assert.AreEqual(1, network.Connections.Count);
            Assert.AreEqual(input, network.Connections[0].Input);
            Assert.AreEqual(output, network.Connections[0].Output);
        }
        public void TestPreviewAndFinishPendingConnection()
        {
            TestableOutput output = new TestableOutput();
            TestableInput  input  = new TestableInput();

            var outputNode = new NodeViewModel();

            outputNode.Outputs.Add(output);

            var inputNode = new NodeViewModel();

            inputNode.Inputs.Add(input);

            NetworkViewModel network = new NetworkViewModel
            {
                Nodes = { outputNode, inputNode }
            };

            output.CreatePendingConnection_public();
            input.SetConnectionPreview_public(true);

            Assert.AreEqual(input, network.PendingConnection.Input);

            input.FinishPendingConnection_public();

            Assert.AreEqual(null, network.PendingConnection);

            Assert.AreEqual(1, network.Connections.Count);
            Assert.AreEqual(input, network.Connections.Items.First().Input);
            Assert.AreEqual(output, network.Connections.Items.First().Output);
        }