public void TestConstructor() {
      requireAttachedJoystick();

      using (var gamePad = new DirectInputGamePad(this.joystick, isAttachedMock)) {
        this.joystick = null; // ownership transfer
      }
    }
Exemplo n.º 2
0
        public void TestConstructor()
        {
            requireAttachedJoystick();

            using (var gamePad = new DirectInputGamePad(this.joystick, isAttachedMock)) {
                this.joystick = null; // ownership transfer
            }
        }
    public void TestName() {
      requireAttachedJoystick();
      
      string expected = this.joystick.Information.InstanceName;

      using (var gamePad = new DirectInputGamePad(this.joystick, isAttachedMock)) {
        this.joystick = null; // ownership transfer

        StringAssert.Contains(expected, gamePad.Name);
      }
    }
Exemplo n.º 4
0
        public void TestName()
        {
            requireAttachedJoystick();

            string expected = this.joystick.Information.InstanceName;

            using (var gamePad = new DirectInputGamePad(this.joystick, isAttachedMock)) {
                this.joystick = null; // ownership transfer

                StringAssert.Contains(expected, gamePad.Name);
            }
        }
Exemplo n.º 5
0
        public void TestAttached(bool expected)
        {
            requireAttachedJoystick();

            CheckAttachedDelegate attachedCheck;

            if (expected)
            {
                attachedCheck = isAttachedMock;
            }
            else
            {
                attachedCheck = isNotAttachedMock;
            }

            using (var gamePad = new DirectInputGamePad(this.joystick, attachedCheck)) {
                this.joystick = null; // ownership transfer

                Assert.AreEqual(expected, gamePad.IsAttached);
            }
        }
    public void TestAttached(bool expected) {
      requireAttachedJoystick();
      
      CheckAttachedDelegate attachedCheck;
      if(expected) {
        attachedCheck = isAttachedMock;
      } else {
        attachedCheck = isNotAttachedMock;
      }

      using (var gamePad = new DirectInputGamePad(this.joystick, attachedCheck)) {
        this.joystick = null; // ownership transfer

        Assert.AreEqual(expected, gamePad.IsAttached);
      }
    }