/// <summary> /// Capture requirements related with UserEmailAddress. /// </summary> /// <param name="userEmailAddress">The UserEmailAddress</param> /// <param name="site">Instance of ITestSite</param> private static void ValidateUserEmailAddress(string userEmailAddress, ITestSite site) { // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R909 bool isVerifiedR909 = AdapterHelper.IsValidEmailAddr(userEmailAddress); site.Log.Add( LogEntryKind.Debug, "For requirement MS-FSSHTTP_R909, the format of the e-mail addresses should be as specified in [RFC2822] section 3.4.1, the actual e-mail addresses value is: {0}", userEmailAddress); site.CaptureRequirementIfIsTrue( isVerifiedR909, "MS-FSSHTTP", 909, @"[In WhoAmISubResponseDataOptionalAttributes][UserEmailAddress] The format of the email address MUST be as specified in [RFC2822] section 3.4.1."); // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R1467 bool isVerifiedR1467 = AdapterHelper.IsValidEmailAddr(userEmailAddress); site.Log.Add( LogEntryKind.Debug, "For requirement MS-FSSHTTP_R1467, the value format of the userEmailAddress attribute should be as specified in [RFC2822], the actual userEmailAddress value is: {0}", userEmailAddress); site.CaptureRequirementIfIsTrue( isVerifiedR1467, "MS-FSSHTTP", 1467, @"[In WhoAmISubResponseDataOptionalAttributes][UserEmailAddress] Format of the e-mail addresses MUST be: addr-spec = local-part ""@"" domain local-part = dot-atom / quoted-string / obs-local-part domain = dot-atom / domain-literal / obs-domain domain-literal = [CFWS] ""["" *([FWS] dcontent) [FWS] ""]"" [CFWS] dcontent = dtext / quoted-pair dtext = NO-WS-CTL / ; Non white space controls %d33-90 / ; The rest of the US-ASCII %d94-126 ; characters not including ""["", ; ""]"", or ""\"" quoted-pair = (""\"" text) / obs-qp text = %d1-9 / ; Characters excluding CR and LF %d11 / %d12 / %d14-127 / obs-text obs-text = *LF *CR *(obs-char *LF *CR) obs-char = %d0-9 / %d11 / ; %d0-127 except CR and %d12 / %d14-127 ; LF obs-domain = atom *(""."" atom) atom = [CFWS] 1*atext [CFWS] atext = ALPHA / DIGIT / ; Any character except controls, ""!"" / ""#"" / ; SP, and specials. ""$"" / ""%"" / ; Used for atoms ""&"" / ""'"" / ""*"" / ""+"" / ""-"" / ""/"" / ""="" / ""?"" / ""^"" / ""_"" / ""`"" / ""{"" / ""|"" / ""}"" / ""~"" dot-atom = [CFWS] dot-atom-text [CFWS] dot-atom-text = 1*atext *(""."" 1*atext) NO-WS-CTL = %d1-8 / ; US-ASCII control characters %d11 / ; that do not include the %d12 / ; carriage return, line feed, %d14-31 / ; and white space characters %d127"); }
/// <summary> /// Capture requirements related with VersioningUserTableType. /// </summary> /// <param name="userTable">The VersioningUserTableType</param> /// <param name="site">Instance of ITestSite</param> private static void ValidateVersioningUserTableType(VersioningUserTableType userTable, ITestSite site) { // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R11158 site.CaptureRequirement( "MS-FSSHTTP", 11158, @"[In VersioningUserTableType] <xs:complexType name=""VersioningUserTableType""> <s:element name=""UserTable"" minOccurs=""1"" maxOccurs=""1""> <s:complexType> <s:element name=""User"" maxOccurs=""unbounded"" minOccurs=""1"" type=""tns:UserDataType"" /> </s:complexType> </s:element> </xs:complexType>"); // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R11159 site.CaptureRequirement( "MS-FSSHTTP", 11159, @"[In VersioningUserTableType] User: An element of type UserDataType (section 2.3.1.42) which describes a single user."); // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R11164 site.CaptureRequirement( "MS-FSSHTTP", 11164, @"[In UserDataType] <xs:complexType name=""UserDataType""> < s:attribute name = ""UserId"" type = ""xs:integer"" use = ""required"" /> < s:attribute name = ""UserLogin"" type = ""xs:UserLoginType"" use = ""required"" /> < s:attribute name = ""UserName"" type = ""xs:UserNameType"" use = ""optional"" /> < s:attribute name = ""UserEmailAddress"" type = ""s:string"" use = ""optional"" /> </ xs:complexType > "); // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R11165 site.CaptureRequirement( "MS-FSSHTTP", 11165, @"[In UserDataType] UserId: An integer that uniquely specifies the user in this user table."); // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R11167 site.CaptureRequirement( "MS-FSSHTTP", 11167, @"[In UserDataType] UserLogin: A UserLoginType that specifies the user login alias of the protocol client."); if (!string.IsNullOrEmpty(userTable.User[0].UserName)) { // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R11169 site.CaptureRequirement( "MS-FSSHTTP", 11169, @"[In UserDataType] UserName: A UserNameType that specifies the user name for the protocol client."); } if (!string.IsNullOrEmpty(userTable.User[0].UserEmailAddress)) { // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R11171 site.CaptureRequirement( "MS-FSSHTTP", 11171, @"[In UserDataType] UserEmailAddress: A string that specifies the email address associated with the protocol client."); // Verify MS-FSSHTTP requirement: MS-FSSHTTP_R11172 site.CaptureRequirementIfIsTrue( AdapterHelper.IsValidEmailAddr(userTable.User[0].UserEmailAddress), "MS-FSSHTTP", 11172, @"[In UserDataType] The format of the email address MUST be as specified in [RFC2822] section 3.4.1."); } }