public void BeforeEach()
        {
            ApplicationSettings.GetInstance().EmulationMode = -1;

            classUnderTest = new EmulationPickerControl();
            classUnderTest.testonly_setIsVigemInstalled(true);
        }
示例#2
0
        public void ShouldEnableProcess_WhenVigemNotInstalled()
        {
            EmulationPickerControl classUnderTest = new EmulationPickerControl();

            classUnderTest.testonly_setIsVigemInstalled(false);

            classUnderTest.DisableUnavailableRadioButtons();

            List <System.Windows.Controls.RadioButton> actualRadioButtons = classUnderTest.testonly_getRadioButtons();

            Assert.AreEqual(false, actualRadioButtons[0].IsEnabled);
            Assert.AreEqual(false, actualRadioButtons[1].IsEnabled);
            Assert.AreEqual(true, actualRadioButtons[2].IsEnabled);
        }
        public void WhenInstalled_ShouldSet__Panel_VigemNotInstalled__toBeVisible()
        {
            using (AutoMock mock = AutoMock.GetLoose())
            {
                Mock <VigemManager> mocky = mock.Mock <VigemManager>();
                mocky.Setup(x => x.IsVigemDriverInstalled())
                .Returns(false);

                EmulationPickerControl classUnderTest = new EmulationPickerControl();
                classUnderTest.ShouldShowVigemInstallWarning(mocky.Object);

                bool actual   = classUnderTest.testonly_isVisible_Panel_VigemNotInstalled();
                bool expected = true;
                Assert.AreEqual(expected, actual);
            }
        }
 public void BeforeEach()
 {
     classUnderTest = new EmulationPickerControl();
     classUnderTest.testonly_setIsVigemInstalled(false);
 }