21 using NUnit.Framework;
25 [Category(
"Data Objects")]
31 Assert.IsNotNull(obj);
33 Assert.AreEqual(
SqlTypeCode.Integer, obj.Type.TypeCode);
34 Assert.AreEqual(33, obj);
40 Assert.IsNotNull(obj);
42 Assert.AreEqual(
SqlTypeCode.BigInt, obj.Type.TypeCode);
43 Assert.AreEqual(8399902L, obj);
51 Assert.IsNotNull(obj1);
52 Assert.IsNotNull(obj2);
57 Assert.AreEqual(
SqlTypeCode.Integer, obj1.Type.TypeCode);
58 Assert.AreEqual(
SqlTypeCode.Integer, obj2.Type.TypeCode);
60 Assert.IsTrue(obj1.IsComparableTo(obj2));
61 Assert.AreEqual(0, obj1.CompareTo(obj2));
69 Assert.IsNotNull(obj1);
70 Assert.IsNotNull(obj2);
75 Assert.AreEqual(
SqlTypeCode.Integer, obj1.Type.TypeCode);
76 Assert.AreEqual(
SqlTypeCode.Integer, obj2.Type.TypeCode);
78 Assert.IsTrue(obj1.IsComparableTo(obj2));
79 Assert.AreEqual(-1, obj1.CompareTo(obj2));
85 Assert.IsNotNull(obj);
87 Assert.AreEqual(
SqlTypeCode.Integer, obj.Type.TypeCode);
88 Assert.AreEqual(33, obj);
92 Assert.IsNotNull(result);
100 Assert.IsNotNull(obj);
102 Assert.AreEqual(
SqlTypeCode.Integer, obj.Type.TypeCode);
103 Assert.AreEqual(33, obj);
106 Assert.DoesNotThrow(() => result = obj.
AsVarChar());
107 Assert.IsNotNull(result);
115 Assert.IsNotNull(obj);
117 Assert.AreEqual(
SqlTypeCode.Integer, obj.Type.TypeCode);
118 Assert.AreEqual(1, obj);
121 Assert.DoesNotThrow(() => result = obj.
AsBoolean());
122 Assert.IsNotNull(result);
Provides some helper functions for resolving and creating SqlType instances that are primitive to the...
static DataObject Integer(int value)
SqlType Type
Gets the SqlType that defines the object properties
void Integer_Convert_ToDouble()
DataObject AsBoolean()
Converts this object to a boolean type.
DataObject CastTo(SqlType destType)
Converts this object to the given SqlType.
ISqlObject Value
Gets the underlined value that is handled.
SqlTypeCode TypeCode
Gets the kind of SQL type this data-type handles.
void Integer_Convert_ToVarChar()
static NumericType Numeric()
Represents a dynamic object that encapsulates a defined SqlType and a compatible constant ISqlObject ...
SqlTypeCode
Enumerates the codes of all SQL types handled by the system.
void Integer_Convert_ToBoolean()
void Integer_Compare_Equal()
static DataObject BigInt(long value)
void Integer_Compare_NotEqual()