File tree Expand file tree Collapse file tree 1 file changed +6
-18
lines changed
src/NHibernate.Test/Criteria/Lambda Expand file tree Collapse file tree 1 file changed +6
-18
lines changed Original file line number Diff line number Diff line change @@ -12,28 +12,16 @@ public class CriteriaAssertFixture : LambdaFixtureBase
1212 {
1313 private void AssertCriteriaAreNotEqual ( ICriteria expected , ICriteria actual )
1414 {
15- try
16- {
17- AssertCriteriaAreEqual ( expected , actual ) ;
18- Assert . Fail ( "No exception thrown" ) ;
19- }
20- catch
21- {
22- Assert . Pass ( ) ;
23- }
15+ Assert . Throws < AssertionException > (
16+ ( ) => { AssertCriteriaAreEqual ( expected , actual ) ; } ,
17+ "No exception thrown" ) ;
2418 }
2519
2620 private void AssertCriteriaAreNotEqual ( DetachedCriteria expected , DetachedCriteria actual )
2721 {
28- try
29- {
30- AssertCriteriaAreEqual ( expected , actual ) ;
31- Assert . Fail ( "No exception thrown" ) ;
32- }
33- catch
34- {
35- Assert . Pass ( ) ;
36- }
22+ Assert . Throws < AssertionException > (
23+ ( ) => { AssertCriteriaAreEqual ( expected , actual ) ; } ,
24+ "No exception thrown" ) ;
3725 }
3826
3927 [ Test ]
You can’t perform that action at this time.
0 commit comments