Exemplo n.º 1
0
        public void TestConstructorFromSnapshotNode()
        {
            IGraphController graphController = new GraphController(null);
            uint id = 0x10000001;
            string content = "a = b;\nc = d;";
            GraphToDSCompiler.SnapshotNode snapshotNode = new GraphToDSCompiler.SnapshotNode(id, GraphToDSCompiler.SnapshotNodeType.CodeBlock, content);
            CodeBlockNode node = new CodeBlockNode(graphController, snapshotNode);

            Assert.IsNotNull(node);
            Assert.AreEqual(id, node.NodeId);
            Assert.AreEqual(content, node.Text);

            uint[] outputSlots = node.GetOutputSlots();
            uint[] inputSlots = node.GetInputSlots();
            Assert.AreEqual(2, outputSlots.Length);
            Assert.AreEqual(2, inputSlots.Length);
        }