Skip to content

Commit 426b4c5

Browse files
committed
Test - Remove failing BindArrayWithNullElementToIntArray test
This strict binder doesn't allow converting of null to 0 so this test is no relevant
1 parent 83c94d2 commit 426b4c5

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

CefSharp.Extensions.Test/ModelBinding/StrictModelBinderFacts.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -101,29 +101,6 @@ public void NullToValueTypeTheory(Type conversionType)
101101
Assert.Throws<ModelBindingException>(() => binder.Bind(null, conversionType));
102102
}
103103

104-
[Fact]
105-
public void BindArrayWithNullElementToIntArray()
106-
{
107-
var arrayType = typeof(int[]);
108-
109-
IBinder binder = new StrictModelBinder();
110-
var obj = new List<object> { 10, 20, null, 30 };
111-
var result = binder.Bind(obj, arrayType);
112-
113-
Assert.NotNull(result);
114-
Assert.Equal(arrayType, result.GetType());
115-
116-
var arr = (int[])result;
117-
Assert.Equal(obj.Count, arr.Length);
118-
119-
for (int i = 0; i < obj.Count; i++)
120-
{
121-
var expected = obj[i] ?? 0;
122-
var actual = arr[i];
123-
Assert.Equal(expected, actual);
124-
}
125-
}
126-
127104
[Fact]
128105
public void BindListOfNumbersToDoubleArray()
129106
{

0 commit comments

Comments
 (0)