private void ScenarioExecutionFinished(IAsyncResult result)
        {
            TaskLogger.LogEnter();
            object[]  array    = result.AsyncState as object[];
            ITestStep testStep = array[0] as ITestStep;

            TestCasConnectivity.TestCasConnectivityRunInstance testCasConnectivityRunInstance = array[1] as TestCasConnectivity.TestCasConnectivityRunInstance;
            IResponseTracker      responseTracker       = array[2] as IResponseTracker;
            CasTransactionOutcome casTransactionOutcome = array[3] as CasTransactionOutcome;
            SecureString          secureString          = array[4] as SecureString;

            try
            {
                testStep.EndExecute(result);
                this.CompleteSuccessfulOutcome(casTransactionOutcome, testCasConnectivityRunInstance, responseTracker);
            }
            catch (Exception ex)
            {
                testCasConnectivityRunInstance.Outcomes.Enqueue(TestWebApplicationConnectivity2.GenerateVerboseMessage(ex.ToString()));
                this.CompleteFailedOutcome(casTransactionOutcome, testCasConnectivityRunInstance, responseTracker, ex);
            }
            finally
            {
                TaskLogger.LogExit();
                if (secureString != null)
                {
                    secureString.Dispose();
                }
                if (testCasConnectivityRunInstance != null)
                {
                    testCasConnectivityRunInstance.Outcomes.Enqueue(casTransactionOutcome);
                    testCasConnectivityRunInstance.Result.Complete();
                }
            }
        }
 private void TestFinished(object sender, TestEventArgs e)
 {
     this.LogVerbose(e.EventState, TestWebApplicationConnectivity2.GenerateVerboseMessage(Strings.CasHealthWebAppTestStepFinished(e.TestId.ToString())));
 }
 private void ResponseReceived(object sender, HttpWebEventArgs e)
 {
     this.LogVerbose(e.EventState, TestWebApplicationConnectivity2.GenerateVerboseMessage(Strings.CasHealthWebAppLiveIdResponseReceived(e.Request.RequestUri, e.Response.StatusCode, e.Response.RespondingFrontEndServer)));
     this.LogVerbose(e.EventState, TestWebApplicationConnectivity2.GenerateVerboseMessage(Environment.NewLine + Environment.NewLine + e.Response.ToStringNoBody() + Environment.NewLine));
 }
 private void SendingRequest(object sender, HttpWebEventArgs e)
 {
     this.LogVerbose(e.EventState, TestWebApplicationConnectivity2.GenerateVerboseMessage(Strings.CasHealthWebAppSendingRequest(e.Request.RequestUri)));
     this.LogVerbose(e.EventState, TestWebApplicationConnectivity2.GenerateVerboseMessage(Environment.NewLine + Environment.NewLine + e.Request.ToStringNoBody() + Environment.NewLine));
 }