public void MSASHTTP_S03_TC03_SetPolicyKeyRequestHeader() { #region Change the query value type to PlainText. // Call ConfigureRequestPrefixFields to set the QueryValueType to PlainText. IDictionary <HTTPPOSTRequestPrefixField, string> requestPrefix = new Dictionary <HTTPPOSTRequestPrefixField, string>(); requestPrefix.Add(HTTPPOSTRequestPrefixField.QueryValueType, QueryValueType.PlainText.ToString()); this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); #endregion #region Call Provision command without setting X-MS-PolicyKey header. SendStringResponse provisionResponse = this.CallProvisionCommand(string.Empty); // Get the policy key from the response of Provision command. string policyKey = TestSuiteHelper.GetPolicyKeyFromSendString(provisionResponse); #endregion #region Call Provision command with setting X-MS-PolicyKey header of the PlainText encoded query value type. // Set the X-MS-PolicyKey header. requestPrefix.Add(HTTPPOSTRequestPrefixField.PolicyKey, policyKey); this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); this.CallProvisionCommand(policyKey); // Reset the X-MS-PolicyKey header. requestPrefix[HTTPPOSTRequestPrefixField.PolicyKey] = string.Empty; this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); #endregion #region Change the query value type to Base64. // Call ConfigureRequestPrefixFields to set the QueryValueType to Base64. requestPrefix[HTTPPOSTRequestPrefixField.QueryValueType] = QueryValueType.Base64.ToString(); this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); #endregion #region Call Provision command without setting Policy key field. provisionResponse = this.CallProvisionCommand(string.Empty); // Get the policy key from the response of Provision command. policyKey = TestSuiteHelper.GetPolicyKeyFromSendString(provisionResponse); #endregion #region Call Provision command with setting Policy key field of the base64 encoded query value type. // Set the Policy key field. requestPrefix[HTTPPOSTRequestPrefixField.PolicyKey] = policyKey; this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); this.CallProvisionCommand(policyKey); // Reset the Policy key field. requestPrefix[HTTPPOSTRequestPrefixField.PolicyKey] = string.Empty; this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); #endregion #region Reset the query value type. requestPrefix[HTTPPOSTRequestPrefixField.QueryValueType] = Common.GetConfigurationPropertyValue("HeaderEncodingType", this.Site); this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); #endregion }
public void MSASHTTP_S02_TC05_Verify501StatusCode() { #region Call a command which is not supported by server. string statusCode = string.Empty; HttpWebResponse httpWebResponse = null; string folderSyncRequestBody = Common.CreateFolderSyncRequest("0").GetRequestDataSerializedXML(); Dictionary <HTTPPOSTRequestPrefixField, string> requestPrefixFields = new Dictionary <HTTPPOSTRequestPrefixField, string> { { HTTPPOSTRequestPrefixField.QueryValueType, QueryValueType.PlainText.ToString() } }; this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefixFields); try { // Call HTTP POST using a NotExist command. this.HTTPAdapter.HTTPPOST(CommandName.NotExist, null, folderSyncRequestBody); Site.Assert.Fail("The server should throw 501 Not Implemented exception."); } catch (WebException exception) { Site.Log.Add(LogEntryKind.Debug, "Caught exception message is:" + exception.Message.ToString()); httpWebResponse = (HttpWebResponse)exception.Response; statusCode = TestSuiteHelper.GetStatusCodeFromException(exception); } finally { requestPrefixFields[HTTPPOSTRequestPrefixField.QueryValueType] = Common.GetConfigurationPropertyValue("HeaderEncodingType", this.Site); this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefixFields); } bool is501StatusCode = (httpWebResponse.StatusCode == HttpStatusCode.NotImplemented) && statusCode.Equals("501"); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R186"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R186 // If the caught status code is 501 Not Implemented, this requirement can be captured. Site.CaptureRequirementIfIsTrue( is501StatusCode, 186, @"[In Status Line] [Status code] 501 Not Implemented [is described as] the server does not support the functionality that is required to fulfill the request."); if (Common.IsRequirementEnabled(465, this.Site)) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R465"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R465 // If the caught status code is 501 Not Implemented, this requirement can be captured. Site.CaptureRequirementIfIsTrue( is501StatusCode, 465, @"[In Appendix A: Product Behavior] Implementation does return 501 Not Implemented status code when implementation does not recognize the request method [or is not able to support it for any resource].(Exchange 2007 SP1 and above follow this behavior.)"); } #endregion }
public void MSASHTTP_S02_TC03_Verify403StatusCode() { Site.Assume.AreEqual <string>("HTTPS", Common.GetConfigurationPropertyValue("TransportType", this.Site), "The status code 403 is verified in HTTPS transport type."); #region Call SUT Control adapter to enable the SSL setting. string sutComputerName = Common.GetConfigurationPropertyValue("SutComputerName", Site); string userName = Common.GetConfigurationPropertyValue("User4Name", Site); string password = Common.GetConfigurationPropertyValue("User4Password", Site); // Use the user who is in Administrator group to enable the SSL setting. bool isSSLUpdated = this.HTTPSUTControlAdapter.ConfigureSSLSetting(sutComputerName, userName, password, Common.GetConfigurationPropertyValue("Domain", Site), true); Site.Assert.IsTrue(isSSLUpdated, "The SSL setting of protocol web service should be enabled."); #endregion #region Call FolderSync command with HTTP transport type. string statusCode = string.Empty; HttpWebResponse httpWebResponse = null; string folderSyncRequestBody = Common.CreateFolderSyncRequest("0").GetRequestDataSerializedXML(); Dictionary <HTTPPOSTRequestPrefixField, string> requestPrefixFields = new Dictionary <HTTPPOSTRequestPrefixField, string>(); try { // Change the prefix of URI to make it disagree with the configuration of server. requestPrefixFields.Add(HTTPPOSTRequestPrefixField.PrefixOfURI, ProtocolTransportType.HTTP.ToString()); this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefixFields); // Call HTTP POST using FolderSync command to synchronize the collection hierarchy. this.HTTPAdapter.HTTPPOST(CommandName.FolderSync, null, folderSyncRequestBody); Site.Assert.Fail("The server should throw 403 Forbidden exception."); } catch (WebException exception) { Site.Log.Add(LogEntryKind.Debug, "Caught exception message is:" + exception.Message.ToString()); httpWebResponse = (HttpWebResponse)exception.Response; statusCode = TestSuiteHelper.GetStatusCodeFromException(exception); } finally { // Reset the PrefixOfURI. requestPrefixFields[HTTPPOSTRequestPrefixField.PrefixOfURI] = Common.GetConfigurationPropertyValue("TransportType", this.Site); this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefixFields); // Reset the SSL setting. isSSLUpdated = this.HTTPSUTControlAdapter.ConfigureSSLSetting(sutComputerName, userName, password, Common.GetConfigurationPropertyValue("Domain", this.Site), false); Site.Assert.IsTrue(isSSLUpdated, "The SSL setting of protocol web service should be disabled."); } // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R180"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R180 // If the caught status code is 403 Forbidden, this requirement can be captured. Site.CaptureRequirementIfIsTrue( (httpWebResponse.StatusCode == HttpStatusCode.Forbidden) && statusCode.Equals("403"), 180, @"[In Status Line] [Status code] 403 Forbidden [is described as] the user is not enabled for ActiveSync synchronization."); #endregion }
public void MSASHTTP_S02_TC04_Verify404StatusCode() { #region Call FolderSync command with invalid URI. string statusCode = string.Empty; HttpWebResponse httpWebResponse = null; string folderSyncRequestBody = Common.CreateFolderSyncRequest("0").GetRequestDataSerializedXML(); string sutComputerName = Common.GetConfigurationPropertyValue("SutComputerName", Site); Dictionary <HTTPPOSTRequestPrefixField, string> requestPrefixFields = new Dictionary <HTTPPOSTRequestPrefixField, string>(); try { // Change the Host property to make the URI unsupported. requestPrefixFields.Add(HTTPPOSTRequestPrefixField.Host, sutComputerName + "/NotSupport"); this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefixFields); // Call HTTP POST using FolderSync command to synchronize the collection hierarchy. this.HTTPAdapter.HTTPPOST(CommandName.FolderSync, null, folderSyncRequestBody); Site.Assert.Fail("The server should throw 404 Not Found exception."); } catch (WebException exception) { Site.Log.Add(LogEntryKind.Debug, "Caught exception message is:" + exception.Message.ToString()); httpWebResponse = (HttpWebResponse)exception.Response; statusCode = TestSuiteHelper.GetStatusCodeFromException(exception); } finally { // Reset the Host. requestPrefixFields[HTTPPOSTRequestPrefixField.Host] = sutComputerName; this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefixFields); } bool is404StatusCode = (httpWebResponse.StatusCode == HttpStatusCode.NotFound) && statusCode.Equals("404"); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R182"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R182 // If the caught status code is 404 Not Found, this requirement can be captured. Site.CaptureRequirementIfIsTrue( is404StatusCode, 182, @"[In Status Line] [Status code] 404 Not Found [is described as] the specified URI could not be found [or the server is not a valid server with ActiveSync]."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R441"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R441 // If the caught status code is 404 Not Found, this requirement can be captured. Site.CaptureRequirementIfIsTrue( is404StatusCode, 441, @"[In Status Line] [Status code] 404 Not Found [is described as] [the specified URI could not be found or] the server is not a valid server with ActiveSync."); #endregion }
public void MSASHTTP_S02_TC01_Verify400StatusCode() { #region Call ConfigureRequestPrefixFields to set the ActiveSyncProtocolVersion to 191. IDictionary <HTTPPOSTRequestPrefixField, string> requestPrefix = new Dictionary <HTTPPOSTRequestPrefixField, string>(); requestPrefix.Add(HTTPPOSTRequestPrefixField.ActiveSyncProtocolVersion, "191"); this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); #endregion #region Synchronize the collection hierarchy via FolderSync command. string statusCode = string.Empty; HttpWebResponse httpWebResponse = null; string folderSyncRequest = Common.CreateFolderSyncRequest("0").GetRequestDataSerializedXML(); try { // Call HTTP POST using FolderSync command to synchronize the collection hierarchy. this.HTTPAdapter.HTTPPOST(CommandName.FolderSync, null, folderSyncRequest); Site.Assert.Fail("The server should throw 400 Bad Request exception."); } catch (WebException exception) { Site.Log.Add(LogEntryKind.Debug, "Caught exception message is:" + exception.Message.ToString()); httpWebResponse = (HttpWebResponse)exception.Response; statusCode = TestSuiteHelper.GetStatusCodeFromException(exception); } bool is400StatusCode = (httpWebResponse.StatusCode == HttpStatusCode.BadRequest) && statusCode.Equals("400"); #endregion // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R176"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R176 // If the caught status code is 400 Bad Request, this requirement can be captured. Site.CaptureRequirementIfIsTrue( is400StatusCode, 176, @"[In Status Line] [Status code] 400 Bad Request [is described as] the request could not be understood by the server due to malformed syntax."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R188"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R188 // If the caught status code is 400 Bad Request, this requirement can be captured. Site.CaptureRequirementIfIsTrue( is400StatusCode, 188, @"[In Status Line] In the case of other malformed requests, the server returns status code 400."); #region Synchronize the collection hierarchy again via FolderSync command. try { // Call HTTP POST using FolderSync command to synchronize the collection hierarchy. this.HTTPAdapter.HTTPPOST(CommandName.FolderSync, null, folderSyncRequest); Site.Assert.Fail("The server should throw 400 Bad Request exception."); } catch (WebException exception) { Site.Log.Add(LogEntryKind.Debug, "Caught exception message is:" + exception.Message.ToString()); httpWebResponse = (HttpWebResponse)exception.Response; statusCode = TestSuiteHelper.GetStatusCodeFromException(exception); } finally { // Reset the ActiveSyncProtocolVersion. string activeSyncProtocolVersion = Common.ConvertActiveSyncProtocolVersion(Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", Site), Site); requestPrefix[HTTPPOSTRequestPrefixField.ActiveSyncProtocolVersion] = activeSyncProtocolVersion; this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); } is400StatusCode = (httpWebResponse.StatusCode == HttpStatusCode.BadRequest) && statusCode.Equals("400"); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R177"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R177 // If the caught status code is 400 Bad Request, this requirement can be captured. Site.CaptureRequirementIfIsTrue( is400StatusCode, 177, @"[In Status Line] [Status code] 400 Bad Request [is described as] if the client repeats the request without modifications, then the same error [400 Bad Request] occurs."); #endregion }
public void MSASHTTP_S02_TC02_Verify401StatusCode() { #region Call FolderSync command with no credential. HttpWebResponse httpWebResponse = null; string statusCode = string.Empty; try { // Switch the user to an invalid user. this.InvalidUserInformation.UserName = null; this.InvalidUserInformation.UserPassword = null; this.InvalidUserInformation.UserDomain = null; this.SwitchUser(this.InvalidUserInformation, false); // Call HTTP POST using FolderSync command to synchronize the collection hierarchy. this.CallFolderSyncCommand(); Site.Assert.Fail("The server should throw 401 Unauthorized exception."); } catch (WebException exception) { Site.Log.Add(LogEntryKind.Debug, "Caught exception message is:" + exception.Message.ToString()); httpWebResponse = (HttpWebResponse)exception.Response; statusCode = TestSuiteHelper.GetStatusCodeFromException(exception); } finally { // Reset the user credential. this.SwitchUser(this.UserOneInformation, false); } bool is401StatusCode = (httpWebResponse.StatusCode == HttpStatusCode.Unauthorized) && statusCode.Equals("401"); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R178"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R178 // If the caught status code is 401 Unauthorized, this requirement can be captured. Site.CaptureRequirementIfIsTrue( is401StatusCode, 178, @"[In Status Line] [Status code] 401 Unauthorized [is described as] the resource requires authorization [or authorization was refused]."); #endregion #region Call FolderSync command with invalid credential. try { // Switch the user to an invalid user. this.InvalidUserInformation.UserName = this.UserOneInformation.UserName; this.InvalidUserInformation.UserPassword = this.UserOneInformation.UserPassword + "InvalidPassword"; this.InvalidUserInformation.UserDomain = this.UserOneInformation.UserDomain; this.SwitchUser(this.InvalidUserInformation, false); // Call HTTP POST using FolderSync command to synchronize the collection hierarchy. this.CallFolderSyncCommand(); Site.Assert.Fail("The server should throw 401 Unauthorized exception."); } catch (WebException exception) { Site.Log.Add(LogEntryKind.Debug, "Caught exception message is:" + exception.Message.ToString()); httpWebResponse = (HttpWebResponse)exception.Response; statusCode = TestSuiteHelper.GetStatusCodeFromException(exception); } finally { // Reset the user credential. this.SwitchUser(this.UserOneInformation, false); } is401StatusCode = (httpWebResponse.StatusCode == HttpStatusCode.Unauthorized) && statusCode.Equals("401"); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R523"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R523 // If the caught status code is 401 Unauthorized, this requirement can be captured. Site.CaptureRequirementIfIsTrue( is401StatusCode, 523, @"[In Status Line] [Status code] 401 Unauthorized [is described as] the [resource requires authorization or] authorization was refused."); #endregion }
public void MSASHTTP_S01_TC10_CommandParameter_Occurrence_PlainText() { #region User3 calls SendMail to send a meeting request to User2 IDictionary <HTTPPOSTRequestPrefixField, string> requestPrefix = new Dictionary <HTTPPOSTRequestPrefixField, string>(); string sendMailSubject = Common.GenerateResourceName(this.Site, "SendMail"); string smartReplySubject = Common.GenerateResourceName(this.Site, "SmartReply"); // Call ConfigureRequestPrefixFields to change the QueryValueType. requestPrefix.Add(HTTPPOSTRequestPrefixField.QueryValueType, QueryValueType.PlainText.ToString()); this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); // Switch the current user to user3 and synchronize the collection hierarchy. this.SwitchUser(this.UserThreeInformation, true); // Call SendMail command to send the meeting request to User2. this.SendMeetingRequest(sendMailSubject); #endregion #region User2 calls SmartReply command to reply the request to User3 with Occurrence command parameter // Call ConfigureRequestPrefixFields to switch the credential to User2 and synchronize the collection hierarchy. this.SwitchUser(this.UserTwoInformation, true); // Call Sync command to get the ServerId of the received meeting request. string itemServerId = this.LoopToSyncItem(this.UserTwoInformation.InboxCollectionId, sendMailSubject, true); // Add the received item to the item collection of User2. CreatedItems inboxItemForUserTwo = new CreatedItems { CollectionId = this.UserTwoInformation.InboxCollectionId }; inboxItemForUserTwo.ItemSubject.Add(sendMailSubject); this.UserTwoInformation.UserCreatedItems.Add(inboxItemForUserTwo); // Call Sync command to get the ServerId of the calendar item. string calendarItemServerId = this.LoopToSyncItem(this.UserTwoInformation.CalendarCollectionId, sendMailSubject, true); CreatedItems calendarItemForUserTwo = new CreatedItems { CollectionId = this.UserTwoInformation.CalendarCollectionId }; calendarItemForUserTwo.ItemSubject.Add(sendMailSubject); this.UserTwoInformation.UserCreatedItems.Add(calendarItemForUserTwo); // Call SmartReply command with the Occurrence command parameter. string startTime = (string)this.GetElementValueFromSyncResponse(this.UserTwoInformation.CalendarCollectionId, calendarItemServerId, Response.ItemsChoiceType8.StartTime); string occurrence = TestSuiteHelper.ConvertInstanceIdFormat(startTime); string userTwoMailboxAddress = Common.GetMailAddress(this.UserTwoInformation.UserName, this.UserTwoInformation.UserDomain); string userThreeMailboxAddress = Common.GetMailAddress(this.UserThreeInformation.UserName, this.UserThreeInformation.UserDomain); this.CallSmartReplyCommand(userTwoMailboxAddress, userThreeMailboxAddress, itemServerId, smartReplySubject, null, null, occurrence); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R513"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R513 // SmartReply command executed successfully with setting Occurrence command parameter, so this requirement can be captured. Site.CaptureRequirement( 513, @"[In Command-Specific URI Parameters] [Parameter] Occurrence [is described as] A string that specifies the ID of a particular occurrence in a recurring meeting."); #endregion #region User3 gets the reply mail // Call ConfigureRequestPrefixFields to switch the credential to User3 and synchronize the collection hierarchy. this.SwitchUser(this.UserThreeInformation, false); // Call Sync command to get the ServerId of the received the reply. this.LoopToSyncItem(this.UserThreeInformation.InboxCollectionId, smartReplySubject, true); this.AddCreatedItemToCollection("User3", this.UserThreeInformation.InboxCollectionId, smartReplySubject); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R529"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R529 // SmartReply command executed successfully with setting Occurrence command parameter, so this requirement can be captured. Site.CaptureRequirement( 529, @"[In Command-Specific URI Parameters] [Parameter] Occurrence [is used by] SmartReply."); #endregion #region Reset the query value type and user credential. requestPrefix[HTTPPOSTRequestPrefixField.QueryValueType] = Common.GetConfigurationPropertyValue("HeaderEncodingType", this.Site); HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); this.SwitchUser(this.UserOneInformation, false); #endregion }
public void MSASHTTP_S01_TC09_CommandParameter_Occurrence_Base64() { #region User3 calls SendMail to send a meeting request to User2. IDictionary <HTTPPOSTRequestPrefixField, string> requestPrefix = new Dictionary <HTTPPOSTRequestPrefixField, string>(); string sendMailSubject = Common.GenerateResourceName(this.Site, "SendMail"); string smartForwardSubject = Common.GenerateResourceName(this.Site, "SmartForward"); // Call ConfigureRequestPrefixFields to change the QueryValueType to Base64. requestPrefix.Add(HTTPPOSTRequestPrefixField.QueryValueType, QueryValueType.Base64.ToString()); this.HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); // Switch the current user to user3 and synchronize the collection hierarchy. this.SwitchUser(this.UserThreeInformation, true); // Call SendMail command to send the meeting request to User2. this.SendMeetingRequest(sendMailSubject); #endregion #region User2 calls MeetingResponse command to accept the received meeting request and forward it to User1. // Call ConfigureRequestPrefixFields to switch the credential to User2 and synchronize the collection hierarchy. this.SwitchUser(this.UserTwoInformation, true); // Call Sync command to get the ServerId of the received meeting request. string itemServerId = this.LoopToSyncItem(this.UserTwoInformation.InboxCollectionId, sendMailSubject, true); // Add the received item to the item collection of User2. CreatedItems inboxItemForUserTwo = new CreatedItems { CollectionId = this.UserTwoInformation.InboxCollectionId }; inboxItemForUserTwo.ItemSubject.Add(sendMailSubject); this.UserTwoInformation.UserCreatedItems.Add(inboxItemForUserTwo); // Check the calendar item if is exist. string calendarItemServerId = this.LoopToSyncItem(this.UserTwoInformation.CalendarCollectionId, sendMailSubject, true); CreatedItems calendarItemForUserTwo = new CreatedItems { CollectionId = this.UserTwoInformation.CalendarCollectionId }; calendarItemForUserTwo.ItemSubject.Add(sendMailSubject); this.UserTwoInformation.UserCreatedItems.Add(calendarItemForUserTwo); // Call MeetingResponse command to accept the received meeting request. this.CallMeetingResponseCommand(this.UserTwoInformation.InboxCollectionId, itemServerId); // The accepted meeting request will be moved to Delete Items folder. itemServerId = this.LoopToSyncItem(this.UserTwoInformation.DeletedItemsCollectionId, sendMailSubject, true); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R432"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R432 // MeetingResponse command is executed successfully, so this requirement can be captured. Site.CaptureRequirementIfIsNotNull( itemServerId, 432, @"[In Command Codes] [Command] MeetingResponse [is] used to accept [, tentatively accept , or decline] a meeting request in the user's Inbox folder."); // Remove the inboxItemForUserTwo object from the clean up list since it has been moved to Delete Items folder. this.UserTwoInformation.UserCreatedItems.Remove(inboxItemForUserTwo); this.AddCreatedItemToCollection("User2", this.UserTwoInformation.DeletedItemsCollectionId, sendMailSubject); // Call SmartForward command to forward the meeting to User1 string startTime = (string)this.GetElementValueFromSyncResponse(this.UserTwoInformation.CalendarCollectionId, calendarItemServerId, Response.ItemsChoiceType8.StartTime); string occurrence = TestSuiteHelper.ConvertInstanceIdFormat(startTime); string userOneMailboxAddress = Common.GetMailAddress(this.UserOneInformation.UserName, this.UserOneInformation.UserDomain); string userTwoMailboxAddress = Common.GetMailAddress(this.UserTwoInformation.UserName, this.UserTwoInformation.UserDomain); this.CallSmartForwardCommand(userTwoMailboxAddress, userOneMailboxAddress, itemServerId, smartForwardSubject, null, null, occurrence); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R513"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R513 // SmartForward command executed successfully with setting Occurrence command parameter, so this requirement can be captured. Site.CaptureRequirement( 513, @"[In Command-Specific URI Parameters] [Parameter] Occurrence [is described as] A string that specifies the ID of a particular occurrence in a recurring meeting."); this.AddCreatedItemToCollection("User3", this.UserThreeInformation.DeletedItemsCollectionId, "Meeting Forward Notification: " + smartForwardSubject); #endregion #region User1 gets the forwarded meeting request // Call ConfigureRequestPrefixFields to switch the credential to User1 and synchronize the collection hierarchy. this.SwitchUser(this.UserOneInformation, true); this.AddCreatedItemToCollection("User1", this.UserOneInformation.InboxCollectionId, smartForwardSubject); this.AddCreatedItemToCollection("User1", this.UserOneInformation.CalendarCollectionId, smartForwardSubject); // Call Sync command to get the ServerId of the received meeting request. this.LoopToSyncItem(this.UserOneInformation.InboxCollectionId, smartForwardSubject, true); // Call Sync command to get the ServerId of the calendar item. this.LoopToSyncItem(this.UserOneInformation.CalendarCollectionId, smartForwardSubject, true); #endregion #region User3 gets the Meeting Forward Notification email in the Deleted Items folder. // Call ConfigureRequestPrefixFields to switch the credential to User3 and synchronize the collection hierarchy. this.SwitchUser(this.UserThreeInformation, false); // Call Sync command to get the ServerId of the received meeting request and the notification email. this.LoopToSyncItem(this.UserThreeInformation.DeletedItemsCollectionId, "Meeting Forward Notification: " + smartForwardSubject, true); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASHTTP_R119"); // Verify MS-ASHTTP requirement: MS-ASHTTP_R119 // SmartForward command executed successfully with setting Occurrence command parameter, so this requirement can be captured. Site.CaptureRequirement( 119, @"[In Command-Specific URI Parameters] [Parameter] Occurrence [is used by] SmartForward."); #endregion #region Reset the query value type. requestPrefix[HTTPPOSTRequestPrefixField.QueryValueType] = Common.GetConfigurationPropertyValue("HeaderEncodingType", this.Site); HTTPAdapter.ConfigureRequestPrefixFields(requestPrefix); #endregion }