Ejemplo n.º 1
0
        public void CanSelectAndNotThrowExceptionWhenPassedIncorrectType()
        {
            int numNodes = 100;

            // select all of them one by one
            for (int i = 0; i < numNodes; i++)
            {
                CurrentDynamoModel.OnRequestSelect(this, new ModelEventArgs(null));
            }
        }
Ejemplo n.º 2
0
        public void TestOnRequestSelect()
        {
            //Arrange
            //This will subscribe our local method to the RequestNodeSelect event
            CurrentDynamoModel.RequestNodeSelect += CurrentDynamoModel_RequestNodeSelect;

            //Act
            //This will execute the OnRequestSelect() method
            CurrentDynamoModel.OnRequestSelect(this, new ModelEventArgs(null));

            //Assert
            CurrentDynamoModel.RequestNodeSelect -= CurrentDynamoModel_RequestNodeSelect;
            //This will validate that the local handler was executed and set the flag in true
            Assert.IsTrue(requestNodeSelect);
        }