Ejemplo n.º 1
0
        public void TestOnRequestTaskDialog()
        {
            //Arrange
            //This will subscribe our local method to the RequestTaskDialog event
            CurrentDynamoModel.RequestTaskDialog += CurrentDynamoModel_RequestTaskDialog;
            var args = new TaskDialogEventArgs(
                new Uri("localhost", UriKind.Relative), "Test Dialog", "Summary", "Description");

            //Act
            CurrentDynamoModel.OnRequestTaskDialog(null, args);

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