Ejemplo n.º 1
0
        public void TestInitializePluginNodeSettings_InitializesLoadedSettingOnPluginNode()
        {
            var nodeMoq        = new Mock <NodeModel>("");
            var testPluginNode = new TestPluginNode
            {
                Model = nodeMoq.Object
            };

            nodeMoq.SetupGet(n => n.NodeViewModel).Returns(testPluginNode);

            testPluginNode.InitializePluginNodeSettings();

            nodeMoq.Verify(n => n.GetVariable(It.IsAny <string>()), Times.Once);
        }
Ejemplo n.º 2
0
        public void TestInitializePluginNodeSettings_InitializesNewSettingInNodeModelPersistedVariables()
        {
            var nodeMoq        = new Mock <NodeModel>("");
            var testPluginNode = new TestPluginNode
            {
                Model = nodeMoq.Object
            };

            nodeMoq.SetupGet(n => n.NodeViewModel).Returns(testPluginNode);

            testPluginNode.InitializePluginNodeSettings();

            nodeMoq.Verify(n => n.InitializePersistedVariableToProperty(It.IsAny <PropertyInfo>()), Times.Once);
        }