public ConvertTo ( ITypeDescriptorContext ctx, |
||
ctx | ITypeDescriptorContext | |
ci | ||
value | object | |
type | ||
리턴 | object |
public void ConvertTo_TypeError2 () { TimeSpanSecondsConverter cv = new TimeSpanSecondsConverter (); 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 () { TimeSpanSecondsConverter cv = new TimeSpanSecondsConverter (); 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"); ts = TimeSpan.FromMilliseconds (3900); Assert.AreEqual ("3", cv.ConvertTo (null, null, ts, typeof (string)), "A2"); }
public void ConvertTo_TypeError1 () { TimeSpanSecondsConverter cv = new TimeSpanSecondsConverter (); Assert.AreEqual ("59", cv.ConvertTo (null, null, 59, typeof (string)), "A1"); }