public TestItemIcon CreateTestItemIconWithIG(int maxTransferableQuantity, out IItemIconConstArg arg) { IItemIconConstArg thisArg; TestItemIcon itemIcon = CreateTestItemIcon(out thisArg); IIconGroup ig = Substitute.For <IIconGroup>(); itemIcon.SetIconGroup(ig); arg = thisArg; return(itemIcon); }
public TestItemIcon CreateTestItemIcon(bool isEmpty, bool isReorderable, bool isTransferable, out IItemIconConstArg arg) { IItemIconConstArg thisArg; TestItemIcon itemIcon = CreateTestItemIcon(out thisArg); IItemIconEmptinessStateEngine emptinessStateEngine = thisArg.emptinessStateEngine; emptinessStateEngine.IsEmpty().Returns(isEmpty); IIconGroup ig = Substitute.For <IIconGroup>(); itemIcon.SetIconGroup(ig); ig.GetSize().Returns(2); if (isReorderable) { ig.AllowsInsert().Returns(true); } else { ig.AllowsInsert().Returns(false); } thisArg.transferabilityHandlerImplementor.IsTransferable().Returns(isTransferable); arg = thisArg; return(itemIcon); }