Example #1
0
        public void TestSearchConstructNewNodeModel()
        {
            //Arrange
            const string nodeName = "TheNoodle";
            const string catName  = "TheCat";
            const string descr    = "TheCat";
            const string path     = @"C:\temp\graphics.dyn";

            var guid1        = Guid.NewGuid();
            var dummyInfo1   = new CustomNodeInfo(guid1, nodeName, catName, descr, path);
            var moq          = new Mock <ICustomNodeSource>();
            var dummySearch1 = new CustomNodeSearchElement(moq.Object, dummyInfo1);

            //Act
            var nodeCreated = dummySearch1.CreateNode();

            //Assert
            //We are using a Mock for the customNodeManager parameter passed to CustomNodeSearchElement constructor then it will be null
            Assert.IsNull(nodeCreated);
        }