示例#1
0
        public void WhenThrowingObject_ThenObjectShouldBeDisconnected()
        {
            var genericGrabbable = new GenericGrabbable(_unityRigidbody);

            genericGrabbable.Throw(_fixedJoint, new Vector3(), new Vector3());

            Assert.IsNull(_fixedJoint.connectedBody);
        }
示例#2
0
        public void WhenThrowingObject_ThenTorqueIsAppliedToObject()
        {
            var genericGrabbable = new GenericGrabbable(_unityRigidbody);
            var torque           = new Vector3();

            genericGrabbable.Throw(_fixedJoint, new Vector3(), torque);

            _unityRigidbody.Received().AddTorque(torque);
        }
示例#3
0
        public void WhenThrowingObject_ThenForceIsAppliedToObject()
        {
            var genericGrabbable = new GenericGrabbable(_unityRigidbody);
            var force            = new Vector3();

            genericGrabbable.Throw(_fixedJoint, force, new Vector3());

            _unityRigidbody.Received().AddForce(force);
        }