We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c94554 commit 2c84730Copy full SHA for 2c84730
src/NHibernate.Test/UtilityTest/SetSnapShotFixture.cs
@@ -82,6 +82,18 @@ public void TestCopyToObjectArray()
82
Assert.That(list, Is.EquivalentTo(array));
83
}
84
85
+ [Test]
86
+ public void WhenCopyToIsCalledWithIncompatibleArrayTypeThenThrowArgumentException()
87
+ {
88
+ var list = new List<string> { "test1", null, "test2" };
89
+ ICollection sn = new SetSnapShot<string>(list);
90
+
91
+ var array = new int[3];
92
+ Assert.That(
93
+ () => sn.CopyTo(array, 0),
94
+ Throws.ArgumentException);
95
+ }
96
97
[Test]
98
public void TestSerialization()
99
{
0 commit comments