11 [TestCase(
"1980-10-06")]
12 [TestCase(
"2001 11 22")]
14 TObject obj = TObject.CreateAndCastFromObject(TType.GetDateType(
SqlType.Date), data);
15 Assert.IsNotNull(obj);
16 Assert.AreEqual(obj.TType.SqlType,
SqlType.Date);
19 [TestCase(
"22:58:10.578")]
20 [TestCase(
"15:27:32")]
21 [TestCase(
"14:08:35 +2")]
22 [TestCase(
"19:02:11.478 +12")]
25 TObject obj = TObject.CreateAndCastFromObject(TType.GetDateType(
SqlType.Time), data);
26 Assert.IsNotNull(obj);
27 Assert.AreEqual(obj.TType.SqlType,
SqlType.Time);
30 [TestCase(
"1957-05-12T22:41:36.735 +5")]
31 [TestCase(
"2015-03-18T14:35:01.447")]
32 [TestCase(
"1478-01-01T17:10:05")]
33 [TestCase(
"1980-04-06 03:12:00")]
34 [TestCase(
"1957-12-01 07:18:14.556 +11")]
36 TObject obj = TObject.CreateAndCastFromObject(TType.GetDateType(
SqlType.TimeStamp), data);
37 Assert.IsNotNull(obj);
38 Assert.AreEqual(obj.TType.SqlType,
SqlType.TimeStamp);
41 [TestCase(
"true",
true)]
42 [TestCase(
"false",
false)]
43 [TestCase(
"0",
false)]
45 [TestCase(
"True",
true)]
47 TObject obj = TObject.CreateAndCastFromObject(TType.GetBooleanType(
SqlType.Boolean), data);
48 Assert.IsNotNull(obj);
49 Assert.AreEqual(obj.TType.SqlType,
SqlType.Boolean);
50 Assert.AreEqual(expected, obj.Object);
void TimeCast(object data)
void DateCast(object data)
void TimeStampCast(string data)
Defines the properties of a specific SQL Type and handles the values compatible.
void CastToBoolean(object data, bool expected)