ConvertTo() публичный Метод

public ConvertTo ( ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type ) : object
ctx ITypeDescriptorContext
ci CultureInfo
value object
type System.Type
Результат object
		public void ConvertTo_TypeError1 ()
		{
			TimeSpanSecondsOrInfiniteConverter cv = new TimeSpanSecondsOrInfiniteConverter ();

			Assert.AreEqual ("59", cv.ConvertTo (null, null, 59, typeof (string)), "A1");
		}
		public void ConvertTo_TypeError2 ()
		{
			TimeSpanSecondsOrInfiniteConverter cv = new TimeSpanSecondsOrInfiniteConverter ();
			TimeSpan ts;

			ts = TimeSpan.FromSeconds (59);

			Assert.AreEqual ("59", cv.ConvertTo (null, null, ts, typeof (int)), "A1");
			Assert.AreEqual ("59", cv.ConvertTo (null, null, ts, null), "A2");
		}
		public void ConvertTo ()
		{
			TimeSpanSecondsOrInfiniteConverter cv = new TimeSpanSecondsOrInfiniteConverter ();
			TimeSpan ts;

			ts = TimeSpan.FromSeconds (59);
			Assert.AreEqual ("59", cv.ConvertTo (null, null, ts, typeof (string)), "A1");

			ts = TimeSpan.FromSeconds (144);
			Assert.AreEqual ("144", cv.ConvertTo (null, null, ts, typeof (string)), "A2");
			
			/* infinity tests */
			Assert.AreEqual ("Infinite", cv.ConvertTo (null, null, TimeSpan.MaxValue, typeof (string)), "A4");
			Assert.AreEqual ("Infinite", cv.ConvertTo (null, null, new TimeSpan (Int64.MaxValue), typeof (string)), "A5");
			Assert.AreEqual ("922337203685", cv.ConvertTo (null, null, new TimeSpan (Int64.MaxValue - 1), typeof (string)), "A6");
		}