@@ -51,7 +51,7 @@ public static int CompareString(string left, string right, bool textCompare)
51
51
}
52
52
53
53
[ Test ]
54
- public void StringEqualityInVisualBasic ( )
54
+ public void VisualBasicStringComparison ( )
55
55
{
56
56
ICriteria expected =
57
57
CreateTestCriteria ( typeof ( Person ) )
@@ -60,7 +60,13 @@ public void StringEqualityInVisualBasic()
60
60
. Add ( Restrictions . Gt ( "Name" , "test name" ) )
61
61
. Add ( Restrictions . Ge ( "Name" , "test name" ) )
62
62
. Add ( Restrictions . Lt ( "Name" , "test name" ) )
63
- . Add ( Restrictions . Le ( "Name" , "test name" ) ) ;
63
+ . Add ( Restrictions . Le ( "Name" , "test name" ) )
64
+ . Add ( Restrictions . EqProperty ( "Name" , "Name" ) )
65
+ . Add ( Restrictions . Not ( Restrictions . EqProperty ( "Name" , "Name" ) ) )
66
+ . Add ( Restrictions . GtProperty ( "Name" , "Name" ) )
67
+ . Add ( Restrictions . GeProperty ( "Name" , "Name" ) )
68
+ . Add ( Restrictions . LtProperty ( "Name" , "Name" ) )
69
+ . Add ( Restrictions . LeProperty ( "Name" , "Name" ) ) ;
64
70
65
71
IQueryOver < Person > actual =
66
72
CreateTestQueryOver < Person > ( )
@@ -69,7 +75,13 @@ public void StringEqualityInVisualBasic()
69
75
. And ( p => CompareString ( p . Name , "test name" , true ) > 0 )
70
76
. And ( p => CompareString ( p . Name , "test name" , true ) >= 0 )
71
77
. And ( p => CompareString ( p . Name , "test name" , true ) < 0 )
72
- . And ( p => CompareString ( p . Name , "test name" , true ) <= 0 ) ;
78
+ . And ( p => CompareString ( p . Name , "test name" , true ) <= 0 )
79
+ . And ( p => CompareString ( p . Name , p . Name , true ) == 0 )
80
+ . And ( p => CompareString ( p . Name , p . Name , true ) != 0 )
81
+ . And ( p => CompareString ( p . Name , p . Name , true ) > 0 )
82
+ . And ( p => CompareString ( p . Name , p . Name , true ) >= 0 )
83
+ . And ( p => CompareString ( p . Name , p . Name , true ) < 0 )
84
+ . And ( p => CompareString ( p . Name , p . Name , true ) <= 0 ) ;
73
85
74
86
AssertCriteriaAreEqual ( expected , actual ) ;
75
87
}
0 commit comments