예제 #1
0
		public void Initialize_Locked_Null ()
		{
			ToolboxItem item = new ToolboxItem ();
			item.Lock ();
			item.Initialize (null);
		}
예제 #2
0
		public void Locked_Twice ()
		{
			ToolboxItem item = new ToolboxItem ();
			item.Lock ();
			item.Lock ();
		}
예제 #3
0
		public void NullValues ()
		{
			ToolboxItem item = new ToolboxItem ();
			item.AssemblyName = null;
			Assert.IsNull (item.AssemblyName, "AssemblyName");
			item.Bitmap = null;
			Assert.IsNull (item.Bitmap, "Bitmap");
			item.DisplayName = null;
			Assert.AreEqual (String.Empty, item.DisplayName, "DisplayName");
			item.Filter = null;
			Assert.AreEqual (0, item.Filter.Count, "Filter");
			item.TypeName = null;
			Assert.AreEqual (String.Empty, item.TypeName, "TypeName");
			item.Company = null;
			Assert.AreEqual (String.Empty, item.Company, "Company");
			// can't assign null without a NRE
			item.DependentAssemblies = new AssemblyName [0];
			Assert.AreEqual (0, item.DependentAssemblies.Length, "DependentAssemblies");
			item.Description = null;
			Assert.AreEqual (String.Empty, item.Description, "Description");
			item.IsTransient = true;
			Assert.IsTrue (item.IsTransient, "IsTransient");
			Assert.AreEqual (9, item.Properties.Count, "Properties");
			item.Lock ();
			Assert.AreEqual (9, item.Properties.Count, "Properties/Lock");
		}