public ItemIconPickUpImplementor CreateIIPUImplementor(int transferableQuantity, int itemQuantity, int pickUpStepQuantity, out IItemIcon ii, out IItemIconTransactionManager iiTAM, out IPickUpSystemUIElementFactory uieFactory)
    {
        IItemIcon thisII = Substitute.For <IItemIcon>();

        thisII.GetUIImage().Returns(Substitute.For <IUIImage>());
        IItemTemplate itemTemp = Substitute.For <IItemTemplate>();

        itemTemp.GetPickUpStepQuantity().Returns(pickUpStepQuantity);
        // thisII.GetItemTemplate().Returns(itemTemp);
        IUIItem item = Substitute.For <IUIItem>();

        item.GetItemTemplate().Returns(itemTemp);
        thisII.GetUIItem().Returns(item);
        thisII.GetTransferableQuantity().Returns(transferableQuantity);
        thisII.GetItemQuantity().Returns(itemQuantity);
        thisII.GetIconGroup().Returns(Substitute.For <IIconGroup>());
        IItemIconTransactionManager   thisIITAM      = Substitute.For <IItemIconTransactionManager>();
        IPickUpSystemUIElementFactory thisUIEFactory = Substitute.For <IPickUpSystemUIElementFactory>();
        ItemIconPickUpImplementor     implementor    = new ItemIconPickUpImplementor(thisIITAM, thisUIEFactory);

        implementor.SetItemIcon(thisII);
        ii         = thisII;
        iiTAM      = thisIITAM;
        uieFactory = thisUIEFactory;
        return(implementor);
    }
예제 #2
0
 public IconGroupConstArg(
     IUIManager uim,
     IPickUpSystemProcessFactory pickUpSystemProcessFactory,
     IPickUpSystemUIElementFactory pickUpSystemUIElementFactory,
     IPickUpSystemUIA pickUpSyatemUIA,
     IUIImage image,
     IUITool tool,
     IItemIconTransactionManager iiTAM,
     int minSize,
     int maxSize,
     IHoverPadsManager hoverPadsManager,
     List <IItemIcon> iis
     ) : base(
         uim,
         pickUpSystemProcessFactory,
         pickUpSystemUIElementFactory,
         image,
         pickUpSyatemUIA,
         ActivationMode.None
         )
 {
     thisIITAM            = iiTAM;
     thisMinSize          = minSize;
     thisMaxSize          = maxSize;
     thisHoverPadsManager = hoverPadsManager;
     thisIIs = iis;
 }
    public void AssertPickUpSystemUIEFactoryCreateItemIconIsCalled(IItemIcon ii, IPickUpSystemUIElementFactory factory, bool expectedToReceive)
    {
        IItemIcon leftoverII = Substitute.For <IItemIcon>();

        factory.CreateItemIcon(ii.GetUIItem()).Returns(leftoverII);
        if (expectedToReceive)
        {
            factory.Received(1).CreateItemIcon(ii.GetUIItem());
        }
        else
        {
            factory.DidNotReceive().CreateItemIcon(ii.GetUIItem());
        }
    }
예제 #4
0
    public TestIG CreateTestIG(int minSize, int maxSize, out IIconGroupConstArg arg)
    {
        IUIManager uim = Substitute.For <IUIManager>();
        IPickUpSystemProcessFactory   pickUpSystemProcessFactory   = Substitute.For <IPickUpSystemProcessFactory>();
        IPickUpSystemUIElementFactory pickUpSystemUIElementFactory = Substitute.For <IPickUpSystemUIElementFactory>();
        IPickUpSystemUIA            pickUpSystemUIA  = Substitute.For <IPickUpSystemUIA>();
        IUIImage                    image            = Substitute.For <IUIImage>();
        IUITool                     tool             = Substitute.For <IUITool>();
        IItemIconTransactionManager iiTAM            = Substitute.For <IItemIconTransactionManager>();
        IHoverPadsManager           hoverPadsManager = Substitute.For <IHoverPadsManager>();
        List <IItemIcon>            iis = new List <IItemIcon>();

        IIconGroupConstArg thisArg = new IconGroupConstArg(uim, pickUpSystemProcessFactory, pickUpSystemUIElementFactory, pickUpSystemUIA, image, tool, iiTAM, minSize, maxSize, hoverPadsManager, iis);
        TestIG             testIG  = new TestIG(thisArg);

        arg = thisArg;
        return(testIG);
    }
        public PickUpSystemUIEConstArg(
            IUIManager uim,
            IPickUpSystemProcessFactory pickUpSystemProcessFactory,
            IPickUpSystemUIElementFactory pickUpSystemUIElementFactory,
            IUIImage image,
            IPickUpSystemUIA pickUpSystemUIA,
            ActivationMode activationMode
            ) : base(
                uim,
                pickUpSystemProcessFactory,
                pickUpSystemUIElementFactory,
                pickUpSystemUIA,
                image,
                activationMode

                )
        {
            thisPickUpSystemProcessFactory   = pickUpSystemProcessFactory;
            thisPickupSystemUIElementFactory = pickUpSystemUIElementFactory;
        }
예제 #6
0
 public PickableUIEConstArg(
     IUIManager uim,
     IPickUpSystemProcessFactory pickUpSystemProcessFactory,
     IPickUpSystemUIElementFactory pickUpSystemUIElementFactory,
     IUIAdaptor uia,
     IPickableUIImage pickableUIImage,
     IUITool tool,
     IDragImageImplementor dragImageImplementor,
     IVisualPickednessStateEngine visualPickednessStateEngine
     ) : base(
         uim,
         pickUpSystemProcessFactory,
         pickUpSystemUIElementFactory,
         uia,
         pickableUIImage,
         ActivationMode.None
         )
 {
     thisDragImageImplementor        = dragImageImplementor;
     thisVisualPickednessStateEngien = visualPickednessStateEngine;
 }
 public ItemIconPickUpImplementor(IItemIconTransactionManager iiTAM, IPickUpSystemUIElementFactory pickUpSystemUIElementFactory)
 {
     thisIITAM = iiTAM;
     thisPickUpSystemUIElementFactory = pickUpSystemUIElementFactory;
 }
예제 #8
0
 public AbsPickUpSystemUIAActivationData(IUIManager uim, IPickUpSystemProcessFactory pickUpSystemProcessFactory, IPickUpSystemUIElementFactory pickUpSystemUIElementFactory, IPickUpManager pickUpManager) : base(uim, pickUpSystemProcessFactory, pickUpSystemUIElementFactory)
 {
     thisPickUpManager = pickUpManager;
 }
예제 #9
0
 public ItemIconConstArg(IUIManager uim, IPickUpSystemProcessFactory pickUpSystemProcessFactory, IPickUpSystemUIElementFactory pickUpSystemUIElementFactory, IItemIconUIAdaptor iiUIA, IItemIconImage itemIconImage, IUITool tool, IDragImageImplementor dragImageImplementor, IVisualPickednessStateEngine visualPickednessStateEngine, IItemIconTransactionManager iiTAM, IUIItem item, IItemIconTransactionStateEngine iiTAStateEngine, IItemIconPickUpImplementor pickUpImplementor, IItemIconEmptinessStateEngine emptinessStateEngine, ITransferabilityHandlerImplementor transferabilityHandlerImplementor, IQuantityRoller quantityRoller) : base(uim, pickUpSystemProcessFactory, pickUpSystemUIElementFactory, iiUIA, itemIconImage, tool, dragImageImplementor, visualPickednessStateEngine)
 {
     thisIITAM                = iiTAM;
     thisItem                 = item;
     thisIITAStateEngine      = iiTAStateEngine;
     thisIIPickUpImplementor  = iiPickUpImplementor;
     thisEmptinessStateEngine = emptinessStateEngine;
     thisQuantityRoller       = quantityRoller;
 }