Exemplo n.º 1
0
        public void ConfirmRemovingPrigAssembly_should_show_the_message_to_message_box(
            [Values(VSConstants.MessageBoxResult.IDYES, VSConstants.MessageBoxResult.IDNO)]
            VSConstants.MessageBoxResult response)
        {
            // Arrange
            var fixture = new Fixture().Customize(new AutoMoqCustomization());

            var deletionalInclude = fixture.Create <string>();

            var vm = new PrigViewModel();

            vm.MessageBoxParameter.Subscribe(_ => _.Result = response);

            // Act
            var result = vm.ConfirmRemovingPrigAssembly(deletionalInclude);

            // Assert
            Assert.AreEqual(response == VSConstants.MessageBoxResult.IDYES, result);
            var msgBox = vm.MessageBoxParameter.Value;

            Assert.AreEqual(OLEMSGBUTTON.OLEMSGBUTTON_YESNO, msgBox.Button);
            Assert.AreEqual(OLEMSGICON.OLEMSGICON_QUERY, msgBox.Icon);
            Assert.IsNotNullOrEmpty(msgBox.Text);
        }