Пример #1
0
        public void SelectTest()
        {
            //Checks there is no elements selected
            var startingAmount = selection.SelectionResults.Count();

            Assert.AreEqual(0, startingAmount);

            //Selects the test node
            selectionHelperMock
            .Setup(x => x.RequestSelectionOfType("testMessage", SelectionType.Many, SelectionObjectType.Element))
            .Returns(new List <ModelBase> {
                testNode
            });
            selection.Select(testNode);

            //checks one node is selected
            var result = selection.SelectionResults.Count();

            Assert.AreEqual(1, result);

            selectionHelperMock.VerifyAll();
        }
Пример #2
0
        public void SelectionIdentifierTest()
        {
            //Selects the test node
            selectionHelperMock
            .Setup(x => x.RequestSelectionOfType("testMessage", SelectionType.Many, SelectionObjectType.Element))
            .Returns(new List <ModelBase> {
                testNode
            });
            selection.Select(testNode);

            var expectedResult = new List <string> {
                testNode.GUID.ToString()
            };
            var result = selection.SelectionIdentifier;

            Assert.AreEqual(expectedResult, result);
        }