示例#1
0
		public void SetValue ()
		{
			// OutOfBrowserSettings only provides getters - using SetValue throws
			OutOfBrowserSettings oob = new OutOfBrowserSettings ();
			Assert.Throws<ArgumentException> (delegate {
				oob.SetValue (OutOfBrowserSettings.BlurbProperty, "blurb");
			}, "BlurbProperty");
			Assert.Throws<ArgumentException> (delegate {
				oob.SetValue (OutOfBrowserSettings.EnableGPUAccelerationProperty, true);
			}, "EnableGPUAccelerationProperty");
			Assert.Throws<ArgumentException> (delegate {
				oob.SetValue (OutOfBrowserSettings.IconsProperty, null);
			}, "IconsProperty");
			Assert.Throws<ArgumentException> (delegate {
				oob.SetValue (OutOfBrowserSettings.SecuritySettingsProperty, null);
			}, "SecuritySettingsProperty");
			Assert.Throws<ArgumentException> (delegate {
				oob.SetValue (OutOfBrowserSettings.ShortNameProperty, "short-name");
			}, "ShortNameProperty");
			Assert.Throws<ArgumentException> (delegate {
				oob.SetValue (OutOfBrowserSettings.ShowInstallMenuItemProperty, true);
			}, "ShowInstallMenuItemProperty");
			Assert.Throws<ArgumentException> (delegate {
				oob.SetValue (OutOfBrowserSettings.WindowSettingsProperty, null);
			}, "WindowSettingsProperty");
		}
示例#2
0
        public void SetValue()
        {
            // OutOfBrowserSettings only provides getters - using SetValue throws
            OutOfBrowserSettings oob = new OutOfBrowserSettings();

            Assert.Throws <ArgumentException> (delegate {
                oob.SetValue(OutOfBrowserSettings.BlurbProperty, "blurb");
            }, "BlurbProperty");
            Assert.Throws <ArgumentException> (delegate {
                oob.SetValue(OutOfBrowserSettings.EnableGPUAccelerationProperty, true);
            }, "EnableGPUAccelerationProperty");
            Assert.Throws <ArgumentException> (delegate {
                oob.SetValue(OutOfBrowserSettings.IconsProperty, null);
            }, "IconsProperty");
            Assert.Throws <ArgumentException> (delegate {
                oob.SetValue(OutOfBrowserSettings.SecuritySettingsProperty, null);
            }, "SecuritySettingsProperty");
            Assert.Throws <ArgumentException> (delegate {
                oob.SetValue(OutOfBrowserSettings.ShortNameProperty, "short-name");
            }, "ShortNameProperty");
            Assert.Throws <ArgumentException> (delegate {
                oob.SetValue(OutOfBrowserSettings.ShowInstallMenuItemProperty, true);
            }, "ShowInstallMenuItemProperty");
            Assert.Throws <ArgumentException> (delegate {
                oob.SetValue(OutOfBrowserSettings.WindowSettingsProperty, null);
            }, "WindowSettingsProperty");
        }