示例#1
0
 public void TopLevelSettingsPUT212()
 {
     using (PexDisposableContext disposables = PexDisposableContext.Create())
     {
         MemorySettingsStorage memorySettingsStorage;
         SettingsGroup         settingsGroup;
         string[] ss = new string[1];
         object[] os = new object[1];
         ss[0] = "";
         os[0] = "";
         memorySettingsStorage = MemorySettingsStorageFactory.Create(ss, os);
         disposables.Add((IDisposable)memorySettingsStorage);
         settingsGroup = new SettingsGroup((ISettingsStorage)memorySettingsStorage);
         disposables.Add((IDisposable)settingsGroup);
         object s0 = new object();
         this.TopLevelSettingsPUT2(settingsGroup, "", s0);
         disposables.Dispose();
         PexAssert.IsNotNull((object)settingsGroup);
         PexAssert.IsNull(settingsGroup.Storage);
     }
 }
示例#2
0
 public void SubGroupSettingsPUT112()
 {
     using (PexDisposableContext disposables = PexDisposableContext.Create())
     {
         MemorySettingsStorage memorySettingsStorage;
         SettingsGroup         settingsGroup;
         string[] ss = new string[1];
         object[] os = new object[1];
         ss[0] = "\u0100\uf5a0\ub4ac\u661c";
         os[0] = "";
         memorySettingsStorage = MemorySettingsStorageFactory.Create(ss, os);
         disposables.Add((IDisposable)memorySettingsStorage);
         settingsGroup = new SettingsGroup((ISettingsStorage)memorySettingsStorage);
         disposables.Add((IDisposable)settingsGroup);
         this.SubGroupSettingsPUT1(settingsGroup, "\u0100\uf5a0\ub4ac\u661c",
                                   "\u0100\uf5a0\ub4ac\u661c\u0100\u0100\u0100\u0100\u0100\u0100\u0100\u0100");
         disposables.Dispose();
         PexAssert.IsNotNull((object)settingsGroup);
         PexAssert.IsNull(settingsGroup.Storage);
     }
 }
 public void SubGroupSettingsPUT214()
 {
     using (PexDisposableContext disposables = PexDisposableContext.Create())
     {
         MemorySettingsStorage memorySettingsStorage;
         SettingsGroup         settingsGroup;
         string[] ss = new string[1];
         object[] os = new object[1];
         ss[0] = "";
         object boxi = (object)(default(int));
         os[0] = boxi;
         memorySettingsStorage = MemorySettingsStorageFactory.Create(ss, os);
         disposables.Add((IDisposable)memorySettingsStorage);
         settingsGroup = new SettingsGroup((ISettingsStorage)memorySettingsStorage);
         disposables.Add((IDisposable)settingsGroup);
         RegistrySettingsStorage s0 = new RegistrySettingsStorage((RegistryKey)null);
         this.SubGroupSettingsPUT2(settingsGroup, "", (object)s0);
         disposables.Dispose();
         PexAssert.IsNotNull((object)settingsGroup);
         PexAssert.IsNull(settingsGroup.Storage);
     }
 }
示例#4
0
 public void SaveAndLoadSettingsPUT101()
 {
     using (PexDisposableContext disposables = PexDisposableContext.Create())
     {
         MemorySettingsStorage memorySettingsStorage;
         string[] ss = new string[3];
         object[] os = new object[3];
         ss[0] = "\0\0";
         ss[1] = "\0\0";
         ss[2] = "\0\0";
         os[0] = "\0\0";
         object boxi = (object)(default(int));
         os[1] = boxi;
         object boxb = (object)(default(bool));
         os[2] = boxb;
         memorySettingsStorage = MemorySettingsStorageFactory.Create(ss, os);
         disposables.Add((IDisposable)memorySettingsStorage);
         object s0 = new object();
         this.SaveAndLoadSettingsPUT1(memorySettingsStorage, "", s0);
         disposables.Dispose();
         PexAssert.IsNotNull((object)memorySettingsStorage);
     }
 }
 public void BadSettingPUT127()
 {
     using (PexDisposableContext disposables = PexDisposableContext.Create())
     {
         MemorySettingsStorage memorySettingsStorage;
         SettingsGroup         settingsGroup;
         string[] ss = new string[2];
         object[] os = new object[2];
         ss[0] = "7Ki\u0080\f@\0";
         ss[1] = "7Ki\u0080\f@\0";
         os[0] = "7Ki\u0080\f@\0";
         object boxi = (object)(default(int));
         os[1] = boxi;
         memorySettingsStorage = MemorySettingsStorageFactory.Create(ss, os);
         disposables.Add((IDisposable)memorySettingsStorage);
         settingsGroup = new SettingsGroup((ISettingsStorage)memorySettingsStorage);
         disposables.Add((IDisposable)settingsGroup);
         this.BadSettingPUT1(settingsGroup, "7Ki\u0080\f@\0", "7Ki\u0080\f@\0", 0);
         disposables.Dispose();
         PexAssert.IsNotNull((object)settingsGroup);
         PexAssert.IsNull(settingsGroup.Storage);
     }
 }
示例#6
0
 public void BadSettingPUT220()
 {
     using (PexDisposableContext disposables = PexDisposableContext.Create())
     {
         MemorySettingsStorage memorySettingsStorage;
         SettingsGroup         settingsGroup;
         string[] ss = new string[2];
         object[] os = new object[2];
         ss[0] = "";
         ss[1] = "";
         os[0] = "";
         object boxb = (object)(default(bool));
         os[1] = boxb;
         memorySettingsStorage = MemorySettingsStorageFactory.Create(ss, os);
         disposables.Add((IDisposable)memorySettingsStorage);
         settingsGroup = new SettingsGroup((ISettingsStorage)memorySettingsStorage);
         disposables.Add((IDisposable)settingsGroup);
         this.BadSettingPUT2(settingsGroup, "", "", false);
         disposables.Dispose();
         PexAssert.IsNotNull((object)settingsGroup);
         PexAssert.IsNull(settingsGroup.Storage);
     }
 }
示例#7
0
 public void TopLevelSettingsPUT114()
 {
     using (PexDisposableContext disposables = PexDisposableContext.Create())
     {
         MemorySettingsStorage memorySettingsStorage;
         SettingsGroup         settingsGroup;
         string[] ss = new string[2];
         object[] os = new object[2];
         ss[0] = new string('\0', 30);
         ss[1] = new string('\0', 30);
         os[0] = new string('\0', 30);
         os[1] = new string('\0', 30);
         memorySettingsStorage = MemorySettingsStorageFactory.Create(ss, os);
         disposables.Add((IDisposable)memorySettingsStorage);
         settingsGroup = new SettingsGroup((ISettingsStorage)memorySettingsStorage);
         disposables.Add((IDisposable)settingsGroup);
         object boxb = (object)(default(bool));
         this.TopLevelSettingsPUT1(settingsGroup, new string('\0', 19), boxb);
         disposables.Dispose();
         PexAssert.IsNotNull((object)settingsGroup);
         PexAssert.IsNull(settingsGroup.Storage);
     }
 }
 public void SubGroupSettingsPUT222()
 {
     using (PexDisposableContext disposables = PexDisposableContext.Create())
     {
         MemorySettingsStorage memorySettingsStorage;
         SettingsGroup         settingsGroup;
         string[] ss = new string[1];
         object[] os = new object[1];
         ss[0] = new string('\0', 22);
         object boxb = (object)(default(bool));
         os[0] = boxb;
         PexSafeHelpers.AssignBoxedValue <bool>
             (boxb, PexSafeHelpers.ByteToBoolean((byte)128));
         memorySettingsStorage = MemorySettingsStorageFactory.Create(ss, os);
         disposables.Add((IDisposable)memorySettingsStorage);
         settingsGroup = new SettingsGroup((ISettingsStorage)memorySettingsStorage);
         disposables.Add((IDisposable)settingsGroup);
         object boxb1 = (object)(default(bool));
         PexSafeHelpers.AssignBoxedValue <bool>
             (boxb1, PexSafeHelpers.ByteToBoolean((byte)128));
         this.SubGroupSettingsPUT2(settingsGroup, new string('\0', 22), boxb1);
         disposables.Dispose();
     }
 }