File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/NHibernate.Test/NHSpecificTest/NH1421 Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections ;
3
+ using System . Collections . Generic ;
3
4
using NUnit . Framework ;
4
5
using SharpTestsEx ;
5
6
using System . Collections . ObjectModel ;
@@ -34,7 +35,9 @@ public void WhenParameterListIsEmptyCollectionUsingQueryThenTrowsArgumentExcepti
34
35
using ( var s = OpenSession ( ) )
35
36
{
36
37
var query = s . CreateQuery ( "from AnEntity a where a.id in (:myList)" ) ;
37
- query . Executing ( x => x . SetParameterList ( "myList" , new ArrayList ( ) ) ) . Throws ( ) . And . Exception . Should ( ) . Be . InstanceOf < ArgumentException > ( ) ;
38
+
39
+ var ex = Assert . Throws < QueryException > ( ( ) => query . SetParameterList ( "myList" , new List < object > ( ) ) ) ;
40
+ Assert . That ( ex . Message , Is . EqualTo ( "An empty parameter-list generates wrong SQL; parameter name 'myList'" ) ) ;
38
41
}
39
42
}
40
43
You can’t perform that action at this time.
0 commit comments