Ejemplo n.º 1
0
        public void TestHighlightOutputTerminalsOfType_TerminalTypeCompatibleButInput_DoesNotSetHighlightVisibleToOnTerminalViewModel()
        {
            var testPluginNode       = new TestPluginNode();
            var terminalMoq          = new Mock <TerminalModel>("", typeof(int), Direction.North, TerminalKind.Input, 0);
            var terminalViewModelMoq = new Mock <InputTerminal>(terminalMoq.Object);

            terminalViewModelMoq.SetupGet(n => n.Model).Returns(terminalMoq.Object);
            testPluginNode.Terminals.Add(terminalViewModelMoq.Object);

            testPluginNode.HighlightOutputTerminalsOfType(typeof(string));

            terminalViewModelMoq.VerifySet(model => model.HighlightVisible = true, Times.Never);
        }
Ejemplo n.º 2
0
        public void TestShowOutputTerminalLabelsOfType_TerminalTypeCompatible_SetsTitleVisibleToOnTerminalViewModel()
        {
            var testPluginNode       = new TestPluginNode();
            var terminalMoq          = new Mock <TerminalModel>("", typeof(int), Direction.North, TerminalKind.Output, 0);
            var terminalViewModelMoq = new Mock <OutputTerminal>(terminalMoq.Object);

            terminalViewModelMoq.SetupGet(n => n.Model).Returns(terminalMoq.Object);
            testPluginNode.Terminals.Add(terminalViewModelMoq.Object);

            testPluginNode.HighlightOutputTerminalsOfType(typeof(int));

            terminalViewModelMoq.Verify(model => model.ShowHighlightIfCompatibleType(It.IsAny <Type>()));
        }