public void ConversionUtility_CanConvertTo_3() { // targetType.IsAssignableFrom(sourceType) Assert.IsTrue(ConversionUtility.CanConvertTo <Stream>(new MemoryStream())); }
public void ConversionUtility_CanConvertTo_2() { // ReferenceEquals(targetType, sourceType) Assert.IsTrue(ConversionUtility.CanConvertTo <bool>(true)); Assert.IsTrue(ConversionUtility.CanConvertTo <int>(1)); }
public void ConversionUtility_CanConvertTo_1() { Assert.IsTrue(ConversionUtility.CanConvertTo <bool>(1)); Assert.IsTrue(ConversionUtility.CanConvertTo <int>("1")); }
public void ConversionUtility_CanConvertTo_6() { Assert.IsFalse(ConversionUtility.CanConvertTo <int>(new SourceType2())); Assert.IsFalse(ConversionUtility.CanConvertTo <int>(new TargetType())); }
public void ConversionUtility_CanConvertTo_5() { // converterTo.CanConvertFrom(sourceType) Assert.IsTrue(ConversionUtility.CanConvertTo <TargetType2>(new SourceType2())); }
public void ConversionUtility_CanConvertTo_4() { // converterFrom.CanConvertTo(targetType) Assert.IsTrue(ConversionUtility.CanConvertTo <TargetType>(new SourceType())); }