ConvertFrom() 공개 메소드

public ConvertFrom ( ITypeDescriptorContext ctx, CultureInfo ci, object data ) : object
ctx ITypeDescriptorContext
ci CultureInfo
data object
리턴 object
		public void ConvertFrom ()
		{
			CommaDelimitedStringCollectionConverter cv = new CommaDelimitedStringCollectionConverter ();
			object o;
			CommaDelimitedStringCollection col;

			o = cv.ConvertFrom (null, null, "hi,bye");
			Assert.AreEqual (typeof (CommaDelimitedStringCollection), o.GetType(), "A1");

			col = (CommaDelimitedStringCollection)o;
			Assert.AreEqual (2, col.Count, "A2");
			Assert.AreEqual ("hi", col[0], "A3");
			Assert.AreEqual ("bye", col[1], "A4");

			col = (CommaDelimitedStringCollection)cv.ConvertFrom (null, null, "hi, bye");
			Assert.AreEqual (2, col.Count, "A5");
			Assert.AreEqual ("hi", col[0], "A6");
			Assert.AreEqual ("bye", col[1], "A7");
		}
		public void ConvertFrom_TypeError ()
		{
			CommaDelimitedStringCollectionConverter cv = new CommaDelimitedStringCollectionConverter ();
			object o;

			o = cv.ConvertFrom (null, null, 59);
			Assert.IsNull (o, "A1");
		}