Dev2.Core.Tests.PopupControllerTests.PopupController_ShowDeleteConfirmation_SetProperties_AllPropertiesDisplayed C# (CSharp) Method

PopupController_ShowDeleteConfirmation_SetProperties_AllPropertiesDisplayed() private method

        public void PopupController_ShowDeleteConfirmation_SetProperties_AllPropertiesDisplayed()
        {
            //------------Setup for test--------------------------
            var popupWasCalled = false;
            string description = string.Empty;
            string header = string.Empty;
            MessageBoxButton buttons = MessageBoxButton.YesNoCancel;

            var popupController = new PopupController
                {
                    ShowDev2MessageBox = (desc, hdr, btn, img, dntShwAgKy) =>
                        {
                            description = desc;
                            header = hdr;
                            buttons = btn;
                            popupWasCalled = true;
                            return MessageBoxResult.OK;
                        }
                };

            const string NameOfItemBeingDeleted = "Random button";
            //------------Execute Test---------------------------
            popupController.ShowDeleteConfirmation(NameOfItemBeingDeleted);
            //------------Assert Results-------------------------
            Assert.IsTrue(popupWasCalled);
            Assert.AreEqual(MessageBoxButton.YesNo, buttons);
            Assert.AreEqual("Are you sure?", header);
            Assert.AreEqual("Are you sure you want to delete " + NameOfItemBeingDeleted + "?", description);
        }