예제 #1
0
        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);
        }
예제 #2
0
파일: WsFaults.cs 프로젝트: prabby/miniclr
 internal static WsMessage GenerateFaultResponse(WsFaultException e)
 {
     return GenerateFaultResponse(e.Header, e.FaultType, e.Message);
 }
예제 #3
0
 internal static WsMessage GenerateFaultResponse(WsFaultException e, ProtocolVersion version)
 {
     return GenerateFaultResponse(e.Header, e.FaultType, e.Message, version);
 }
예제 #4
0
 internal static WsMessage GenerateFaultResponse(WsFaultException e)
 {
     return(GenerateFaultResponse(e.Header, e.FaultType, e.Message));
 }
예제 #5
0
 internal static WsMessage GenerateFaultResponse(WsFaultException e, ProtocolVersion version)
 {
     return(GenerateFaultResponse(e.Header, e.FaultType, e.Message, version));
 }