File tree 1 file changed +5
-3
lines changed
src/NHibernate.Test/UtilityTest
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
- using System . Collections ;
1
+ using System ;
2
+ using System . Collections ;
2
3
using System . Collections . Generic ;
3
4
using System . IO ;
4
5
using System . Runtime . Serialization . Formatters . Binary ;
5
6
using NHibernate . Collection . Generic . SetHelpers ;
7
+ using NSubstitute . ExceptionExtensions ;
6
8
using NUnit . Framework ;
7
9
8
10
namespace NHibernate . Test . UtilityTest
@@ -83,15 +85,15 @@ public void TestCopyToObjectArray()
83
85
}
84
86
85
87
[ Test ]
86
- public void WhenCopyToIsCalledWithIncompatibleArrayTypeThenThrowArgumentException ( )
88
+ public void WhenCopyToIsCalledWithIncompatibleArrayTypeThenThrowArgumentOrInvalidCastException ( )
87
89
{
88
90
var list = new List < string > { "test1" , null , "test2" } ;
89
91
ICollection sn = new SetSnapShot < string > ( list ) ;
90
92
91
93
var array = new int [ 3 ] ;
92
94
Assert . That (
93
95
( ) => sn . CopyTo ( array , 0 ) ,
94
- Throws . ArgumentException ) ;
96
+ Throws . ArgumentException . Or . TypeOf < InvalidCastException > ( ) ) ;
95
97
}
96
98
97
99
[ Test ]
You can’t perform that action at this time.
0 commit comments