Microsoft.Protocols.TestSuites.MS_OXWSCONT.TestSuiteBase.VerifyEmailAddressDictionaryEntryTypeComplexType C# (CSharp) Method

VerifyEmailAddressDictionaryEntryTypeComplexType() private method

Capture EmailAddressDictionaryEntryType Complex Type related requirements.
private VerifyEmailAddressDictionaryEntryTypeComplexType ( EmailAddressDictionaryEntryType responseEmailAddressDictionaryEntryType, EmailAddressDictionaryEntryType requestEmailAddressDictionaryEntryType ) : void
responseEmailAddressDictionaryEntryType Microsoft.Protocols.TestSuites.Common.EmailAddressDictionaryEntryType The EmailAddressDictionaryEntryType element from the response package of GetItem operation.
requestEmailAddressDictionaryEntryType Microsoft.Protocols.TestSuites.Common.EmailAddressDictionaryEntryType The EmailAddressDictionaryEntryType element from the request package of CreateItem operation.
return void
        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).");
        }
        #endregion