private void SetupActionTestCase(ActionTestCase testCase) { SetupBaseTestCase(testCase); var transform = m_Transforms[testCase.transformIndex]; Assert.IsTrue(m_BoneGizmoView.IsActionActive(transform, testCase.expectedAction), testCase.expectedAction + " action should be active"); }
public void MoveBone([ValueSource("MoveBoneCases")] ActionTestCase testCase) { SetupBaseTestCase(testCase); Vector2 worldPosition; Assert.AreEqual(testCase.expected, m_BindPoseView.DoMoveBone(out worldPosition)); }
public void RotateBone([ValueSource("RotateBoneCases")] ActionTestCase testCase) { SetupBaseTestCase(testCase); Vector2 lookAtPosition; Assert.AreEqual(testCase.expected, m_BindPoseView.DoRotateBone(out lookAtPosition)); }
public void MoveBone([ValueSource("MoveBoneCases")] ActionTestCase testCase) { SetupActionTestCase(testCase); var transform = m_Transforms[testCase.transformIndex]; Vector3 deltaPosition; Assert.AreEqual(testCase.expected, m_BoneGizmoView.DoBonePosition(transform, out deltaPosition)); }
public void RotateBone([ValueSource("RotateBoneCases")] ActionTestCase testCase) { SetupActionTestCase(testCase); var transform = m_Transforms[testCase.transformIndex]; float deltaAngle; Assert.AreEqual(testCase.expected, m_BoneGizmoView.DoBoneRotation(transform, out deltaAngle)); }
public void SelectBone([ValueSource("SelectBoneCases")] ActionTestCase testCase) { SetupBaseTestCase(testCase); Assert.AreEqual(testCase.expected, m_BindPoseView.DoSelectBone()); if (testCase.expected) { guiWrapper.Received(1).Repaint(); } else { guiWrapper.DidNotReceive().Repaint(); } }