/// <summary> /// End sub-service signing request. /// </summary> /// <param name="service">sub-service</param> /// <param name="asyncResult">async result</param> protected override object SubServiceEndRequest(IKsiService service, IAsyncResult asyncResult) { if (_returnResponsePayload) { return(service.GetSignResponsePayload(asyncResult)); } return(service.EndSign(asyncResult)); }
public void EndSignInvalidAsyncResultTest() { IKsiService service = GetStaticKsiService(new byte[] { 0 }); KsiServiceException ex = Assert.Throws <KsiServiceException>(delegate { service.EndSign(new TestAsyncResult()); }); Assert.That(ex.Message.StartsWith("Invalid asyncResult type:"), "Unexpected exception message: " + ex.Message); }
public void EndSignArgumentNullTest() { IKsiService service = GetStaticKsiService(new byte[] { 0 }); ArgumentNullException ex = Assert.Throws <ArgumentNullException>(delegate { service.EndSign(null); }); Assert.AreEqual("asyncResult", ex.ParamName); }