DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | List of all members
Deveel.Data.BooleanObjectTest Class Reference

Public Member Functions

void Create_True ()
 
void Convert_True_ToNumber ()
 
void Create_False ()
 
void Convert_False_ToNumber ()
 
void Create_Null ()
 
void Convert_Null_ToNumber ()
 

Detailed Description

Definition at line 24 of file BooleanObjectTest.cs.

Member Function Documentation

void Deveel.Data.BooleanObjectTest.Convert_False_ToNumber ( )
inline

Definition at line 55 of file BooleanObjectTest.cs.

55  {
56  var obj = DataObject.Boolean(false);
57  Assert.IsNotNull(obj);
58  Assert.IsInstanceOf<SqlBoolean>(obj.Value);
59  Assert.AreEqual(false, (bool)obj.AsBoolean());
60 
61  DataObject numObj = null;
62  Assert.DoesNotThrow(() => numObj = obj.AsInteger());
63  Assert.IsNotNull(numObj);
64  Assert.AreEqual(0, (int) numObj);
65  }
void Deveel.Data.BooleanObjectTest.Convert_Null_ToNumber ( )
inline

Definition at line 77 of file BooleanObjectTest.cs.

77  {
78  var obj = DataObject.BooleanNull;
79  Assert.IsNotNull(obj);
80  Assert.IsInstanceOf<SqlBoolean>(obj.Value);
81  Assert.AreEqual(SqlNull.Value, obj.AsBoolean().Value);
82 
83  DataObject numObj = null;
84  Assert.DoesNotThrow(() => numObj = obj.AsInteger());
85  Assert.IsNotNull(numObj);
86  Assert.IsTrue(numObj.IsNull);
87  Assert.AreEqual(SqlNull.Value, numObj.Value);
88  }
static readonly SqlNull Value
Definition: SqlNull.cs:24
void Deveel.Data.BooleanObjectTest.Convert_True_ToNumber ( )
inline

Definition at line 34 of file BooleanObjectTest.cs.

34  {
35  var obj = DataObject.Boolean(true);
36  Assert.IsNotNull(obj);
37  Assert.IsInstanceOf<SqlBoolean>(obj.Value);
38  Assert.AreEqual(true, (bool)obj.AsBoolean());
39 
40  DataObject numObj = null;
41  Assert.DoesNotThrow(() => numObj = obj.AsInteger());
42  Assert.IsNotNull(numObj);
43  Assert.AreEqual(1, (int) numObj);
44  }
void Deveel.Data.BooleanObjectTest.Create_False ( )
inline

Definition at line 47 of file BooleanObjectTest.cs.

47  {
48  var obj = DataObject.Boolean(false);
49  Assert.IsNotNull(obj);
50  Assert.IsInstanceOf<SqlBoolean>(obj.Value);
51  Assert.AreEqual(false, (bool)obj.AsBoolean());
52  }
void Deveel.Data.BooleanObjectTest.Create_Null ( )
inline

Definition at line 68 of file BooleanObjectTest.cs.

68  {
69  var obj = DataObject.BooleanNull;
70  Assert.IsNotNull(obj);
71  Assert.IsInstanceOf<SqlBoolean>(obj.Value);
72  Assert.IsTrue(obj.IsNull);
73  Assert.AreEqual(SqlNull.Value, obj.AsBoolean().Value);
74  }
static readonly SqlNull Value
Definition: SqlNull.cs:24
void Deveel.Data.BooleanObjectTest.Create_True ( )
inline

Definition at line 26 of file BooleanObjectTest.cs.

26  {
27  var obj = DataObject.Boolean(true);
28  Assert.IsNotNull(obj);
29  Assert.IsInstanceOf<SqlBoolean>(obj.Value);
30  Assert.AreEqual(true, (bool)obj.AsBoolean());
31  }

The documentation for this class was generated from the following file: