List <IItemIcon> CreateStubIIsWithNoMatchAndEmptyAt(int size, IEquippableUIItem item, int[] emptyAt) { List <IItemIcon> result = new List <IItemIcon>(); for (int i = 0; i < size; i++) { IEquippableItemIcon tarII = Substitute.For <IEquippableItemIcon>(); bool contained = false; foreach (int j in emptyAt) { if (j == i) { contained = true; } } if (contained) { tarII.GetUIItem().Returns((IUIItem)null); tarII.IsEmpty().Returns(true); } else { IUIItem tarItem = Substitute.For <IUIItem>(); tarII.GetUIItem().Returns(tarItem); tarII.IsEmpty().Returns(false); } result.Add(tarII); } return(result); }