GetStandardValues() public method

Gets a collection of standard values for the reference data type.

public GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection
context ITypeDescriptorContext
return StandardValuesCollection
		public void GetStandardValues ()
		{
			ReferenceConverter converter = new ReferenceConverter (typeof(TestComponent));

			TestComponent component1 = new TestComponent();
			TestComponent component2 = new TestComponent();
			TestReferenceService referenceService = new TestReferenceService ();
			referenceService.AddReference ("reference name 1", component1);
			referenceService.AddReference ("reference name 2", component2);
			ITypeDescriptorContext context = new TestTypeDescriptorContext (referenceService);

			TypeConverter.StandardValuesCollection values = converter.GetStandardValues (context);
			Assert.IsNotNull (values, "#1");
			// 2 components + 1 null value
			Assert.AreEqual (3, values.Count, "#2");
		}