Exemplo n.º 1
0
        public void TestOnRequestsRedraw()
        {
            //Arrange
            //This will subscribe our local method to the RequestsRedraw event
            CurrentDynamoModel.RequestsRedraw += CurrentDynamoModel_RequestsRedraw;

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

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