Esempio n. 1
0
        private string FormatExceptionText(ScenarioException scenarioException, Exception exception)
        {
            string str = exception.Message;

            if (scenarioException != null)
            {
                str = scenarioException.ToString();
            }
            return(str + Environment.NewLine + this.verboseOutput.ToString());
        }
        internal override void CompleteFailedOutcome(CasTransactionOutcome outcome, TestCasConnectivity.TestCasConnectivityRunInstance instance, IResponseTracker responseTracker, Exception e)
        {
            TestEcpConnectivityOutcome testEcpConnectivityOutcome = outcome as TestEcpConnectivityOutcome;
            ScenarioException          scenarioException          = e.GetScenarioException();

            if (scenarioException != null)
            {
                testEcpConnectivityOutcome.FailureSource    = scenarioException.FailureSource.ToString();
                testEcpConnectivityOutcome.FailureReason    = scenarioException.FailureReason.ToString();
                testEcpConnectivityOutcome.FailingComponent = scenarioException.FailingComponent.ToString();
            }
            testEcpConnectivityOutcome.Update(CasTransactionResultEnum.Failure, (scenarioException != null) ? scenarioException.Message.ToString() : e.Message.ToString(), EventTypeEnumeration.Error);
            base.WriteMonitoringEvent(1001, this.MonitoringEventSource, EventTypeEnumeration.Error, Strings.CasHealthTransactionFailures((scenarioException != null) ? scenarioException.Message.ToString() : e.Message.ToString()));
        }
 private bool IsInconclusiveException(ScenarioException scenarioException)
 {
     return(_inconclusiveExceptionTypes != null &&
            _inconclusiveExceptionTypes.Contains(scenarioException.ExceptionType));
 }
Esempio n. 4
0
 public void it_should_throw_expection()
 {
     ScenarioException.Should().BeOfType <FormatException>();
 }