public void MSASAIRS_S02_TC06_BodyPreference_NoAllOrNone_NonTruncatedContentReturned()
{
#region Send a plain text email and get the non-truncated data
string subject = Common.GenerateResourceName(Site, "Subject");
string body = Common.GenerateResourceName(Site, "Body");
this.SendEmail(EmailType.Plaintext, subject, body);
DataStructures.Sync allContentItem = this.GetAllContentItem(subject, this.User2Information.InboxCollectionId);
#endregion
#region Set BodyPreference element
Request.BodyPreference[] bodyPreference = new Request.BodyPreference[]
{
new Request.BodyPreference()
{
Type = 1,
TruncationSize = 100,
TruncationSizeSpecified = true,
}
};
#endregion
#region Verify Sync command related elements
DataStructures.Sync syncItem = this.GetSyncResult(subject, this.User2Information.InboxCollectionId, null, bodyPreference, null);
this.VerifyBodyElements(syncItem.Email.Body, null, false, true);
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASAIRS_R423");
// Verify MS-ASAIRS requirement: MS-ASAIRS_R423
Site.CaptureRequirementIfAreEqual<string>(
allContentItem.Email.Body.Data,
syncItem.Email.Body.Data,
423,
@"[In AllOrNone (BodyPreference)] If the AllOrNone element is not included in the request, then the non-truncated content is synchronized as if the value was set to 0 (FALSE).");
#endregion
#region Verify ItemOperations command related elements
DataStructures.ItemOperations itemOperationsItem = this.GetItemOperationsResult(this.User2Information.InboxCollectionId, syncItem.ServerId, null, bodyPreference, null, null);
this.VerifyBodyElements(itemOperationsItem.Email.Body, null, false, true);
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASAIRS_R424");
// Verify MS-ASAIRS requirement: MS-ASAIRS_R424
Site.CaptureRequirementIfAreEqual<string>(
allContentItem.Email.Body.Data,
itemOperationsItem.Email.Body.Data,
424,
@"[In AllOrNone (BodyPreference)] If the AllOrNone element is not included in the request, then the non-truncated content is retrieved as if the value was set to 0 (FALSE).");
#endregion
#region Verify Search command related elements
DataStructures.Search searchItem = this.GetSearchResult(subject, this.User2Information.InboxCollectionId, itemOperationsItem.Email.ConversationId, bodyPreference, null);
this.VerifyBodyElements(searchItem.Email.Body, null, false, true);
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASAIRS_R422");
// Verify MS-ASAIRS requirement: MS-ASAIRS_R422
Site.CaptureRequirementIfAreEqual<string>(
allContentItem.Email.Body.Data,
searchItem.Email.Body.Data,
422,
@"[In AllOrNone (BodyPreference)] If the AllOrNone element is not included in the request, then the non-truncated content is searched as if the value was set to 0 (FALSE).");
#endregion
#region Verify common requirements
// According to above steps, requirement MS-ASAIRS_R277 can be captured directly
// Add the debug information
Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASAIRS_R277");
// Verify MS-ASAIRS requirement: MS-ASAIRS_R277
Site.CaptureRequirement(
277,
@"[In Truncated (Body)] If the value [of the Truncated element] is FALSE, or there is no Truncated element, then the body of the item has not been truncated.");
#endregion
}
#endregion