Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
 bool IsReorderable()
 {
     return(thisIG.AllowsInsert() && thisIG.GetSize() > 1);
 }