private static Dictionary <string, IConfigurableLtoFlashFeature> InitializeConfigurableFeatures(bool readOnly) { var configurableFeatures = new IConfigurableLtoFlashFeature[] { ConfigurableLtoFlashEcsCompatibilityFeature.Create(readOnly), ConfigurableLtoFlashIntellivisionIICompatibilityFeature.Create(readOnly), ConfigurableLtoFlashShowTitleScreenFeature.Create(readOnly), ConfigurableLtoFlashSaveMenuPositionFeature.Create(readOnly), ConfigurableLtoFlashBooleanFeature.Create(Device.BackgroundGCPropertyName, Resources.Strings.SetBackgroundGarbageCollectCommand_Name, true, DeviceStatusFlags.BackgroundGC, readOnly), ConfigurableLtoFlashBooleanFeature.Create(Device.KeyclicksPropertyName, Resources.Strings.SetKeyclicksCommand_Name, false, DeviceStatusFlags.Keyclicks, readOnly), ConfigurableLtoFlashBooleanFeature.Create(Device.EnableConfigMenuOnCartPropertyName, Resources.Strings.SetEnableConfigMenuOnCartCommand_Name, true, DeviceStatusFlags.EnableCartConfig, readOnly), ConfigurableLtoFlashBooleanFeature.Create(Device.ZeroLtoFlashRamPropertyName, Resources.Strings.SetRandomizeLtoFlashRamCommand_Name, true, DeviceStatusFlags.ZeroRamBeforeLoad, readOnly), }; var configurableFeaturesDictionary = configurableFeatures.ToDictionary(f => f.UniqueId); return(configurableFeaturesDictionary); }
public void ConfigurableLtoFlashFeature_GetValueFromDeviceWithDummyDevice_ThrowsInvalidOperationException(IConfigurableLtoFlashFeature feature) { var dummyDevice = new Device("GetValueFromDeviceWithDummyDevice"); Assert.Throws <InvalidOperationException>(() => feature.GetValueFromDevice(dummyDevice)); }
public void ConfigurableLtoFlashFeature_SetValueOnDeviceWithDummyDevice_ThrowsInvalidOperationException(IConfigurableLtoFlashFeature feature, object value) { var dummyDevice = new Device("SetValueOnDeviceWithDummyDevice"); Assert.Throws <InvalidOperationException>(() => feature.SetValueOnDevice(dummyDevice, value)); }