Example #1
0
        public void HasReadableDescription()
        {
            Exception   exception = new Exception();
            ThrowAction action    = new ThrowAction(exception);

            AssertDescription.IsEqual(action, "throw <" + exception + ">(System.Exception)");
        }
Example #2
0
        public void SetsExceptionOfInvocation()
        {
            Exception   exception = new Exception();
            ThrowAction action    = new ThrowAction(exception);

            object         receiver   = new object();
            MethodInfoStub methodInfo = new MethodInfoStub("method");
            Invocation     invocation = new Invocation(receiver, methodInfo, new object[0]);

            ((IAction)action).Invoke(invocation);

            Assert.AreSame(exception, invocation.Exception, "exception");
        }
 void Start()
 {
     _throwAction = gameObject.AddComponent<ThrowAction>();
     _player = GameObject.FindGameObjectWithTag(Tags.PLAYER);
     _throwAction.ThrowObjectAction += HandAnim;
     _standardPos = this.transform.localPosition;
 }