Skip to content

Commit 94d62f0

Browse files
gokTyBalDgokTyBalD
authored andcommitted
EnumeratorPlugin Test
1 parent 68308d9 commit 94d62f0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

ObjectFiller.Test/ListFillingTest.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,20 @@ public void TestUseEnumerable()
3131
{
3232
Filler<EntityCollection> eFiller = new Filler<EntityCollection>();
3333
eFiller.Setup()
34-
.OnProperty(x => x.EntityArray).IgnoreIt()
34+
.ListItemCount(20)
35+
.OnProperty(x => x.EntityArray, x => x.EntityICollection,
36+
x => x.EntityIList, x => x.ObservableCollection,
37+
x => x.EntityIEnumerable).IgnoreIt()
3538
.SetupFor<Entity>()
36-
.OnProperty(x => x.Id).Use(Enumerable.Range(1, 100).Select(x => (int)Math.Pow(2, x)));
39+
.OnProperty(x => x.Id).Use(Enumerable.Range(1, 22).Select(x => (int)Math.Pow(2, x)));
3740

3841
EntityCollection ec = eFiller.Create();
42+
43+
for (int i = 0; i < ec.EntityList.Count; i++)
44+
{
45+
int lastPowNum = (int)Math.Pow(2, i + 1);
46+
Assert.AreEqual(lastPowNum, ec.EntityList[i].Id);
47+
}
3948
}
4049

4150
[TestMethod]

0 commit comments

Comments
 (0)