Ejemplo n.º 1
0
        public void TestOnRunCompleted()
        {
            //Arrange
            //This will subscribe our local method to the RunCompleted event
            CurrentDynamoModel.RunCompleted += CurrentDynamoModel_RunCompleted;

            //Act
            //This will execute the OnRunCompleted() method
            CurrentDynamoModel.OnRunCompleted(this, true);

            //Assert
            //Unsubcribe from event
            CurrentDynamoModel.RunCompleted -= CurrentDynamoModel_RunCompleted;
            //This will validate that the local handler was executed and set the flag in true
            Assert.IsTrue(runCompleted);
        }