Пример #1
0
        public void TestHighlightInputTerminalsOfType_TerminalTypeCompatibleButOutput_DoesNotSetHighlightVisibleToTrueOnTerminalViewModel()
        {
            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.HighlightInputTerminalsOfType(typeof(string));

            terminalViewModelMoq.VerifySet(model => model.HighlightVisible = true, Times.Never);
        }
Пример #2
0
        public void TestHighlightInputTerminalsOfType_TerminalTypeCompatible_SetsHighlightVisibleTrueOnTerminalViewModel()
        {
            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.HighlightInputTerminalsOfType(typeof(int));

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