public void WhenEmulationMode__VIGEM_AND_PROCESS_INJECTION__ShouldAssumeRemotePlayProcessInjection() { ApplicationSettings.GetInstance().EmulationMode = EmulationConstants.VIGEM_AND_PROCESS_INJECTION; GamepadUpdaterNoSleepControl classUnderTest = new GamepadUpdaterNoSleepControl(); classUnderTest.CalculateIsControlEnabled(); Assert.AreEqual(UIConstants.VISIBILITY_COLLAPSED, classUnderTest.testonly_GetElement_TextBlock_Warning().Visibility); Assert.AreEqual(UIConstants.VISIBILITY_VISIBLE, classUnderTest.testonly_GetElement_TextBlock_Description().Visibility); Assert.AreEqual(UIConstants.VISIBILITY_VISIBLE, classUnderTest.testonly_GetElement_Toggle().Visibility); }
public void WhenEmulationMode__Unknown__ShouldDisableTheControl() { ApplicationSettings.GetInstance().EmulationMode = -1; GamepadUpdaterNoSleepControl classUnderTest = new GamepadUpdaterNoSleepControl(); classUnderTest.CalculateIsControlEnabled(); Assert.AreEqual(UIConstants.VISIBILITY_COLLAPSED, classUnderTest.testonly_GetElement_TextBlock_Description().Visibility); Assert.AreEqual(UIConstants.VISIBILITY_COLLAPSED, classUnderTest.testonly_GetElement_Toggle().Visibility); Assert.AreEqual(UIConstants.VISIBILITY_VISIBLE, classUnderTest.testonly_GetElement_TextBlock_Warning().Visibility); }