public void Converter_ChangeTypeWithType_With_TypeValues() { var typedDateTime = DateTimeValue.ChangeTypeWithType(typeof(DateTime), CultureInfo.InvariantCulture); Assert.AreEqual(DateTimeValue, typedDateTime); var typedDecimal = DecimalValue.ChangeTypeWithType(typeof(Decimal), CultureInfo.InvariantCulture); Assert.AreEqual(DecimalValue, typedDecimal); var typedString = StringValue.ChangeTypeWithType(typeof(String), CultureInfo.InvariantCulture); Assert.AreEqual(StringValue, typedString); var typedGuid = GuidValue.ChangeTypeWithType(typeof(Guid), CultureInfo.InvariantCulture); Assert.AreEqual(GuidValue, typedGuid); var typedInt16 = Int16Value.ChangeTypeWithType(typeof(Int16), CultureInfo.InvariantCulture); Assert.AreEqual(Int16Value, typedInt16); var typedInt32 = Int32Value.ChangeTypeWithType(typeof(Int32), CultureInfo.InvariantCulture); Assert.AreEqual(Int32Value, typedInt32); var typedInt64 = Int64Value.ChangeTypeWithType(typeof(Int64), CultureInfo.InvariantCulture); Assert.AreEqual(Int64Value, typedInt64); var typedBool = BoolValue.ChangeTypeWithType(typeof(bool), CultureInfo.InvariantCulture); Assert.AreEqual(BoolValue, typedBool); }
public object ChangeTypeWithType_DateTime() { return(DateTimeValue.ChangeTypeWithType(typeof(DateTime), CultureInfo.InvariantCulture)); }