We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f95f037 commit 21741fbCopy full SHA for 21741fb
AgileMapper.UnitTests/WhenMappingFromDictionaries.cs
@@ -207,6 +207,23 @@ public void ShouldPopulateANestedSimpleTypeCollectionFromConvertibleTypedEntries
207
now.AddHours(2).ToCurrentCultureString());
208
}
209
210
+ [Fact]
211
+ public void ShouldPopulateARootSimpleTypeArrayFromConvertibleTypedEntries()
212
+ {
213
+ var source = new Dictionary<string, long>
214
215
+ ["[0]"] = 123,
216
+ ["[1]"] = long.MaxValue,
217
+ ["[2]"] = 789
218
+ };
219
+ var result = Mapper.Map(source).ToANew<int[]>();
220
+
221
+ result.Length.ShouldBe(3);
222
+ result.First().ShouldBe(123);
223
+ result.Second().ShouldBeDefault();
224
+ result.Third().ShouldBe(789);
225
+ }
226
227
[Fact]
228
public void ShouldPopulateARootComplexTypeListFromUntypedEntries()
229
{
0 commit comments