public MFTestResults FaultsTest_WsFault() { /// <summary> /// 1. Raises each type of FaultType /// 2. Verifies that the Byte[] returns and is of reasonable size /// </summary> /// bool testResult = true; try { Ws.Services.WsaAddressing.WsWsaHeader testWWH = new Ws.Services.WsaAddressing.WsWsaHeader(); WsFaultException testWF = new WsFaultException(testWWH, WsFaultType.ArgumentException); if (testWF.FaultType != WsFaultType.ArgumentException) { throw new Exception("Incorrect FaultType set"); } if (testWF.Header != testWWH) { throw new Exception("Incorrect Header Set"); } } catch (Exception e) { testResult = false; Log.Comment("Incorrect exception caught: " + e.Message); } return(testResult ? MFTestResults.Pass : MFTestResults.Fail); }
public MFTestResults FaultsTest_WsFault() { /// <summary> /// 1. Raises each type of FaultType /// 2. Verifies that the Byte[] returns and is of reasonable size /// </summary> /// bool testResult = true; try { Ws.Services.WsaAddressing.WsWsaHeader testWWH = new Ws.Services.WsaAddressing.WsWsaHeader(); WsFaultException testWF = new WsFaultException(testWWH, WsFaultType.ArgumentException); if( testWF.FaultType != WsFaultType.ArgumentException ) throw new Exception("Incorrect FaultType set"); if( testWF.Header != testWWH ) throw new Exception("Incorrect Header Set"); } catch (Exception e) { testResult = false; Log.Comment("Incorrect exception caught: " + e.Message); } return (testResult ? MFTestResults.Pass : MFTestResults.Fail); }