public void WhenThrowingObject_ThenObjectShouldBeDisconnected() { var genericGrabbable = new GenericGrabbable(_unityRigidbody); genericGrabbable.Throw(_fixedJoint, new Vector3(), new Vector3()); Assert.IsNull(_fixedJoint.connectedBody); }
public void WhenThrowingObject_ThenTorqueIsAppliedToObject() { var genericGrabbable = new GenericGrabbable(_unityRigidbody); var torque = new Vector3(); genericGrabbable.Throw(_fixedJoint, new Vector3(), torque); _unityRigidbody.Received().AddTorque(torque); }
public void WhenThrowingObject_ThenForceIsAppliedToObject() { var genericGrabbable = new GenericGrabbable(_unityRigidbody); var force = new Vector3(); genericGrabbable.Throw(_fixedJoint, force, new Vector3()); _unityRigidbody.Received().AddForce(force); }