Ejemplo n.º 1
0
 public AbsPointerUpInputState(
     IUIAdaptorInputStateConstArg arg
     ) : base(
         arg
         )
 {
 }
Ejemplo n.º 2
0
 /*  Up state
  *      enter =>
  *              touchCounter reset
  *      pointer down =>
  *              touch counter ++
  *              OnTouch( touchCounter)
  *              WFTapState
  */
 public WaitingForFirstTouchState(
     IUIAdaptorInputStateConstArg engine
     ) : base(
         engine
         )
 {
 }
Ejemplo n.º 3
0
    IUIAdaptorInputStateConstArg CreateMockArg()
    {
        IUIAdaptorInputStateConstArg arg = Substitute.For <IUIAdaptorInputStateConstArg>();

        arg.engine.Returns(Substitute.For <IUIAdaptorInputStateEngine>());
        return(arg);
    }
Ejemplo n.º 4
0
    public void OnDrag_ThrowsException()
    {
        IUIAdaptorInputStateConstArg arg   = CreateMockArg();
        TestAbsPointerUpInputState   state = new TestAbsPointerUpInputState(arg);

        Assert.Throws(
            Is.TypeOf(typeof(System.InvalidOperationException)).
            And.Message.EqualTo("OnDrag should be impossible when pointer is held up, something's wrong"),
            () => {
            state.OnDrag(Substitute.For <ICustomEventData>());
        }
            );
    }
Ejemplo n.º 5
0
    public void OnBeginDrag_ThrowsException()
    {
        IUIAdaptorInputStateConstArg arg   = CreateMockArg();
        TestAbsPointerUpInputState   state = new TestAbsPointerUpInputState(arg);

        Assert.Throws(
            Is.TypeOf(typeof(System.InvalidOperationException)).
            And.Message.EqualTo("OnBeginDrag should not be called while pointer is held up"),
            () => {
            state.OnBeginDrag(Substitute.For <ICustomEventData>());
        }
            );
    }
Ejemplo n.º 6
0
 public AbsUIAdaptorInputState(
     IUIAdaptorInputStateConstArg arg
     )
 {
     thisEngine = arg.engine;
 }