/// <summary>
 /// Run simple test case with Exchange service and mailbox id '*****@*****.**'.
 /// </summary>
 /// <param name="testCase">Test case to run.</param>
 protected void RunSimpleExchangeServiceTestCase(Action <ExchangeService> testCase)
 {
     MockTestRunner.RunTestCase(
         testCase,
         "*****@*****.**",
         new HttpResponseMessage(HttpStatusCode.OK)
     {
         Content = new StringContent("{}")
     },
         null);
 }
 /// <summary>
 /// Run test case and return HTTP 200 (OK).
 /// </summary>
 /// <param name="testCase">Test case.</param>
 /// <param name="exchangeService">Exchange service.</param>
 /// <param name="httpReturnContent">Return content.</param>
 /// <param name="inlineAssertation">Inline assertation.</param>
 internal static void RunHttp200TestCase(
     Action <ExchangeService> testCase,
     string mailboxId,
     HttpResponseMessage httpResponseMessage,
     Action <HttpRequestMessage> inlineAssertation,
     Environment restEnvironment = Environment.Beta)
 {
     MockTestRunner.RunTestCase(
         testCase,
         mailboxId,
         httpResponseMessage,
         inlineAssertation,
         restEnvironment);
 }
        /// <summary>
        /// Run test case with custom http 400 status.
        /// </summary>
        protected void RunTestCaseWith400Status(Action <ExchangeService> testCase, Func <string> errorData, HttpStatusCode errorStatusCode)
        {
            if (errorStatusCode < (HttpStatusCode)400 && errorStatusCode > (HttpStatusCode)499)
            {
                throw new ArgumentException("Test case needs to be run with status code between 400-499");
            }

            MockTestRunner.RunTestCase(
                testCase,
                "*****@*****.**",
                new HttpResponseMessage(errorStatusCode)
            {
                Content = new StringContent(errorData())
            },
                null);
        }