File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/NHibernate.Test/UtilityTest Expand file tree Collapse file tree 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 ;
23using System . Collections . Generic ;
34using System . IO ;
45using System . Runtime . Serialization . Formatters . Binary ;
56using NHibernate . Collection . Generic . SetHelpers ;
7+ using NSubstitute . ExceptionExtensions ;
68using NUnit . Framework ;
79
810namespace NHibernate . Test . UtilityTest
@@ -83,15 +85,15 @@ public void TestCopyToObjectArray()
8385 }
8486
8587 [ Test ]
86- public void WhenCopyToIsCalledWithIncompatibleArrayTypeThenThrowArgumentException ( )
88+ public void WhenCopyToIsCalledWithIncompatibleArrayTypeThenThrowArgumentOrInvalidCastException ( )
8789 {
8890 var list = new List < string > { "test1" , null , "test2" } ;
8991 ICollection sn = new SetSnapShot < string > ( list ) ;
9092
9193 var array = new int [ 3 ] ;
9294 Assert . That (
9395 ( ) => sn . CopyTo ( array , 0 ) ,
94- Throws . ArgumentException ) ;
96+ Throws . ArgumentException . Or . TypeOf < InvalidCastException > ( ) ) ;
9597 }
9698
9799 [ Test ]
You can’t perform that action at this time.
0 commit comments