public void SaveAndLoadSettingsPUT1([PexAssumeUnderTest] MemorySettingsStorage storage1, [PexAssumeUnderTest] String settingName, [PexAssumeNotNull] Object settingValue) { PexAssume.IsTrue(settingName != null); PexAssume.IsTrue(settingValue != null); PexAssume.IsTrue(storage1.GetSetting(settingName) == null); storage1.SaveSetting(settingName, settingValue); PexAssume.AreEqual(settingValue, storage1.GetSetting(settingName)); }
public void SubstorageSettingsPUT1([PexAssumeUnderTest] MemorySettingsStorage storage1, [PexAssumeUnderTest] String subStorageName, [PexAssumeUnderTest] String settingName, [PexAssumeNotNull] Object settingValue) { ISettingsStorage sub = storage1.MakeChildStorage(subStorageName); sub.SaveSetting(settingName, settingValue); PexAssert.AreEqual(settingValue, sub.GetSetting(settingName)); sub.RemoveSetting(settingName); PexAssert.IsNull(sub.GetSetting(settingName)); }
public void RemoveSettingsPUT1([PexAssumeUnderTest] MemorySettingsStorage storage1, [PexAssumeUnderTest] String settingName, [PexAssumeNotNull] Object settingValue) { PexAssume.IsTrue(settingName != null); PexAssume.IsTrue(settingValue != null); PexAssume.IsTrue(storage1.GetSetting(settingName) == null); storage1.SaveSetting(settingName, settingValue); storage1.RemoveSetting(settingName); PexAssert.IsNull(storage1.GetSetting(settingName)); }
public static MemorySettingsStorage Create([PexAssumeUnderTest] String[] settingNames, [PexAssumeNotNull] Object[] settingValues) { PexAssume.IsTrue(settingNames.Length == settingValues.Length); PexAssume.IsTrue(settingNames.Length > 0); MemorySettingsStorage memorySettingsStorage = new MemorySettingsStorage(); for (int count = 0; count < settingNames.Length; count++) { PexAssume.IsTrue(settingValues[count] is string || settingValues[count] is int || settingValues[count] is bool); memorySettingsStorage.SaveSetting(settingNames[count], settingValues[count]); } return(memorySettingsStorage); }
public void BadSettingPUT207() { using (PexDisposableContext disposables = PexDisposableContext.Create()) { SettingsGroup settingsGroup; MemorySettingsStorage memorySettingsStorage = new MemorySettingsStorage(); settingsGroup = new SettingsGroup((ISettingsStorage)memorySettingsStorage); disposables.Add((IDisposable)settingsGroup); this.BadSettingPUT2(settingsGroup, "", "", false); disposables.Dispose(); PexAssert.IsNotNull((object)settingsGroup); PexAssert.IsNull(settingsGroup.Storage); } }
public void SubGroupSettingsPUT104() { using (PexDisposableContext disposables = PexDisposableContext.Create()) { SettingsGroup settingsGroup; MemorySettingsStorage memorySettingsStorage = new MemorySettingsStorage(); settingsGroup = new SettingsGroup((ISettingsStorage)memorySettingsStorage); disposables.Add((IDisposable)settingsGroup); object s0 = new object(); this.SubGroupSettingsPUT1(settingsGroup, "", s0); disposables.Dispose(); PexAssert.IsNotNull((object)settingsGroup); PexAssert.IsNull(settingsGroup.Storage); } }
public void BeforeEachTest() { MemorySettingsStorage storage = new MemorySettingsStorage(); testGroup = new SettingsGroup( storage ); }
public void Init() { storage = new MemorySettingsStorage(); }
public void BeforeEachTest() { MemorySettingsStorage storage = new MemorySettingsStorage(); testGroup = new SettingsGroup(storage); }
public void Init() { MemorySettingsStorage storage = new MemorySettingsStorage(); formSettings = new UserSettings(storage).Form; }
public void BeforeEachTest() { MemorySettingsStorage storage = new MemorySettingsStorage(); testGroup = new SettingsGroupArxNet(storage); testGroup_storage_null = new SettingsGroupArxNet(null); }
public void MakeSubStorages([PexAssumeUnderTest] MemorySettingsStorage storage1, [PexAssumeUnderTest] String subStorageName) { ISettingsStorage sub1 = storage1.MakeChildStorage(subStorageName); PexAssert.IsNotNull(sub1); }