Exemplo n.º 1
0
        public void TestPresetsNamePromptEventArgs()
        {
            //Arrange/Act
            var args = new PresetsNamePromptEventArgs();

            //Subscribe the local function to the RequestPresetsNamePrompt event
            CurrentDynamoModel.RequestPresetsNamePrompt += CurrentDynamoModel_RequestPresetsNamePrompt;
            CurrentDynamoModel.OnRequestPresetNamePrompt(args);

            //After the event execution we need to unsubscribe the local method from the event
            CurrentDynamoModel.RequestPresetsNamePrompt -= CurrentDynamoModel_RequestPresetsNamePrompt;

            //Assert
            Assert.IsNotNull(args.Name);
            Assert.AreEqual(args.Description, "Test Description");
            Assert.AreEqual(args.Success, false);
        }