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