/// <summary> /// Capture EmailAddressDictionaryType Complex Type related requirements. /// </summary> /// <param name="responseEmailAddressDictionaryType">The array of EmailAddressDictionaryEntryType element from the response package of GetItem operation.</param> /// <param name="requestEmailAddressDictionaryType">The array of EmailAddressDictionaryEntryType element from the request package of CreateItem operation.</param> private void VerifyEmailAddressDictionaryTypeComplexType(EmailAddressDictionaryEntryType[] responseEmailAddressDictionaryType, EmailAddressDictionaryEntryType[] requestEmailAddressDictionaryType) { Site.Assert.IsNotNull(responseEmailAddressDictionaryType, "The EmailAddresses element should not be null!"); for (int i = 0; i < responseEmailAddressDictionaryType.Length; i++) { // Verify the EmailAddressDictionaryEntryType element of EmailAddressDictionaryType Complex Type. this.VerifyEmailAddressDictionaryEntryTypeComplexType(responseEmailAddressDictionaryType[i], requestEmailAddressDictionaryType[i]); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCONT_R237"); // Verify MS-OXWSCONT requirement: MS-OXWSCONT_R237 bool isVerifyR237 = this.IsSchemaValidated && (requestEmailAddressDictionaryType[i] != null); Site.CaptureRequirementIfIsTrue( isVerifyR237, 237, @"[In t:EmailAddressDictionaryType Complex Type] The type of the element of Entry is t:EmailAddressDictionaryEntryType (section 3.1.4.1.1.10)"); } // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCONT_R235"); // Verify MS-OXWSCONT requirement: MS-OXWSCONT_R235 // R235 can be captured directly after each e-mail address entry is validated. this.Site.CaptureRequirement( 235, @"[In t:EmailAddressDictionaryType Complex Type] The EmailAddressDictionaryType complex type contains e-mail addresses."); }
/// <summary> /// Capture EmailAddressDictionaryEntryType Complex Type related requirements. /// </summary> /// <param name="responseEmailAddressDictionaryEntryType">The EmailAddressDictionaryEntryType element from the response package of GetItem operation.</param> /// <param name="requestEmailAddressDictionaryEntryType">The EmailAddressDictionaryEntryType element from the request package of CreateItem operation.</param> private void VerifyEmailAddressDictionaryEntryTypeComplexType(EmailAddressDictionaryEntryType responseEmailAddressDictionaryEntryType, EmailAddressDictionaryEntryType requestEmailAddressDictionaryEntryType) { Site.Assert.IsNotNull(responseEmailAddressDictionaryEntryType, "The EmailAddresses element should not contain null entry!"); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCONT_R227"); // Verify MS-OXWSCONT requirement: MS-OXWSCONT_R227 // Key element is a required element in schema, EmailAddressKeyType is verified when the schema is validated. Site.CaptureRequirementIfIsTrue( this.IsSchemaValidated, 227, @"[In t:EmailAddressDictionaryEntryType Complex Type] The type of the attribute of Key is t:EmailAddressKeyType (section 3.1.4.1.2.3)."); // Add the debug information this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCONT_R228"); // Verify MS-OXWSCONT requirement: MS-OXWSCONT_R228 this.Site.CaptureRequirementIfAreEqual<EmailAddressKeyType>( requestEmailAddressDictionaryEntryType.Key, responseEmailAddressDictionaryEntryType.Key, 228, @"[In t:EmailAddressDictionaryEntryType Complex Type] Key attribute: Contains a value that identifies an e-mail address that is associated with a contact (2)."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCONT_R225"); // Verify MS-OXWSCONT requirement: MS-OXWSCONT_R225 // Because R225 is captured based on R227 and R228, so if both of them are captured successfully, R225 also should be captured. this.Site.CaptureRequirement( 225, @"[In t:EmailAddressDictionaryEntryType Complex Type] The EmailAddressDictionaryEntryType complex type represents an e-mail address that is associated with a contact (2)."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCONT_R238"); // Verify MS-OXWSCONT requirement: MS-OXWSCONT_R238 // Because R238 is captured in the same condition with R228, so if R228 is captured successfully, R238 also should be captured. this.Site.CaptureRequirement( 238, @"[In t:EmailAddressDictionaryType Complex Type] Entry element: Represents an e-mail address that is associated with a contact (2)."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCONT_R39"); // Verify MS-OXWSCONT requirement: MS-OXWSCONT_R39 // Because R39 is captured in the same condition with R228, so if R228 is captured successfully, R39 also should be captured. this.Site.CaptureRequirement( 39, @"[In t:ContactItemType Complex Type] EmailAddress element: Contains e-mail addresses that are associated with a contact (2)."); }