Microsoft.Protocols.TestSuites.MS_VERSS.S03_ErrorConditions.MSVERSS_S03_TC08_DeleteAllVersionsUsingInvalidCharacters C# (CSharp) Method

MSVERSS_S03_TC08_DeleteAllVersionsUsingInvalidCharacters() private method

        public void MSVERSS_S03_TC08_DeleteAllVersionsUsingInvalidCharacters()
        {
            // The variable is used to save the soap error code returned from server.
            string errorCode = string.Empty;

            // The variable is used to save the soap error string returned from server.
            string errorString = string.Empty;

            // Enable the versioning of the list.
           bool isSetVersioningSuccess = this.sutControlAdapterInstance.SetVersioning(this.documentLibrary, true, true);
            Site.Assert.IsTrue(
                isSetVersioningSuccess,
                "SetVersioning operation returns {0}, TRUE means the operation was executed successfully," +
                " FALSE means the operation failed", 
                isSetVersioningSuccess);

            // Upload the file into specific list.
            bool isAddFileSuccess =
                this.sutControlAdapterInstance.AddFile(this.documentLibrary, this.fileName, TestSuiteHelper.UploadFileName);
            Site.Assert.IsTrue(
                isAddFileSuccess,
                "AddFile operation returns {0}, TRUE means the operation was executed successfully," +
                " FALSE means the operation failed",
                isAddFileSuccess);

            // Check out and check in file one time to create a new version of the file. 
            this.testSuiteHelper.AddOneFileVersion(this.fileName);

            // The variable is used to save the invalid characters for file name.
            string[] invalidCharacters = new string[] 
            { 
                "\"", "#", "%", "&", "*", ":", "<", "=", ">", "?", "\\",
                "{", "|", "}", "~", "..", "\t", "\n", "\r"
            };

            // The variable is used to save the file relative URL that contains "# or ? and file name" 
            // which will be truncated, and '\t' or '\' is at the end of file name. So fileURL is still a valid URL.
            foreach (string truncatedCharacter in invalidCharacters)
            {
                if (truncatedCharacter == "#" || truncatedCharacter == "?" || truncatedCharacter == "\t" || truncatedCharacter == "\\")
                {
                    string fileURL = string.Empty;

                    if (truncatedCharacter == "\t" || truncatedCharacter == "\\")
                    {
                        fileURL = this.documentLibrary + "/" + this.fileName + truncatedCharacter;
                    }
                    else if (truncatedCharacter == "#" || truncatedCharacter == "?")
                    {
                        fileURL = this.documentLibrary + "/" + this.fileName + truncatedCharacter + this.fileName;
                    }

                    // Call DeleteAllVersion operation to delete the all file version via the valid file relative URL.
                    DeleteAllVersionsResponseDeleteAllVersionsResult deleteAllVersionsResponse = this.protocolAdapterInstance.DeleteAllVersions(fileURL);
                    this.testSuiteHelper.VerifyResultsInformation(deleteAllVersionsResponse.results, OperationName.DeleteAllVersions, true);

                    // Call GetVersions with the filename to get details about all versions of the file.
                    GetVersionsResponseGetVersionsResult getVersionsResponse = this.protocolAdapterInstance.GetVersions(fileURL);

                    // Verify the DeleteAllVersions response results.
                    bool isDeleteAllVersionWithoutDeleteAnyVersions = AdapterHelper.AreVersionsResultEqual(
                        getVersionsResponse.results.result,
                        deleteAllVersionsResponse.results.result);

                    if (truncatedCharacter == "#")
                    {
                        if (Common.IsRequirementEnabled(1930201, this.Site))
                        {
                            // Add the debug information
                            Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930201");

                            // Verify MS-VERSS requirement: MS-VERSS_R1930201
                            Site.CaptureRequirementIfIsTrue(
                                isDeleteAllVersionWithoutDeleteAnyVersions,
                                1930201,
                                @"[In Appendix B: Product Behavior] Implementation does truncates all characters after the first ""#"" in the file name. (<4> Section 3.1.4.1.2.2:  Windows SharePoint Services truncates all characters after the first ""#"" in the file name.)");
                        }
                    }
                    else if (truncatedCharacter == "?")
                    {
                        if (Common.IsRequirementEnabled(1930202, this.Site))
                        {
                            // Add the debug information
                            Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930202");

                            // Verify MS-VERSS requirement: MS-VERSS_R1930202
                            Site.CaptureRequirementIfIsTrue(
                                isDeleteAllVersionWithoutDeleteAnyVersions,
                                1930202,
                                @"[In Appendix B: Product Behavior] Implementation does truncates all characters after the first ""?"" in the file name. (<4> Section 3.1.4.1.2.2:  Windows SharePoint Services truncates all characters after the first ""?"" in the file name.)");
                        }
                    }
                    else if (truncatedCharacter == "\t")
                    {
                        if (Common.IsRequirementEnabled(19302, this.Site))
                        {
                            // Add the debug information
                            Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R19302");

                            // Verify MS-VERSS requirement: MS-VERSS_R19302
                            Site.CaptureRequirementIfIsTrue(
                                isDeleteAllVersionWithoutDeleteAnyVersions,
                                19302,
                                @"[In Appendix B: Product Behavior] Implementation does not return an error to indicate that the tab (\t) character is at the end of the fileName. (<4> Section 3.1.4.1.2.2: The tab (\t) character is ignored at the end of the fileName.)");
                        }
                    }
                    else if (truncatedCharacter == "\\")
                    {
                        if (Common.IsRequirementEnabled(1930205, this.Site))
                        {
                            // Add the debug information
                            Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930205");

                            // Verify MS-VERSS requirement: MS-VERSS_1930205
                            Site.CaptureRequirementIfIsTrue(
                                isDeleteAllVersionWithoutDeleteAnyVersions,
                                1930205,
                                @"[In Appendix B: Product Behavior] Implementation does not return an error to indicate that the backward slash (\) character is at the end of the fileName. (<4> Section 3.1.4.1.2.2: The backward slash (\) character is ignored at the end of the fileName on Windows SharePoint Services 3.0, SharePoint Foundation 2010, and SharePoint Foundation 2013.)");
                        }
                    }

                    // Check out and check in file one time to create a new version of the file. 
                    this.testSuiteHelper.AddOneFileVersion(this.fileName);
                }
            }

            bool isR17201Enabled = Common.IsRequirementEnabled(17201, this.Site);
            bool isR1930101Enabled = Common.IsRequirementEnabled(1930101, this.Site);

            if (isR17201Enabled || isR1930101Enabled || Common.IsRequirementEnabled(1930213, this.Site) || Common.IsRequirementEnabled(1930203, this.Site) || Common.IsRequirementEnabled(1930214, this.Site) || Common.IsRequirementEnabled(1930204, this.Site))
            {
                foreach (string invalidCharacter in invalidCharacters)
                {
                    // The variable is used to save a file name with an invalid character.
                    string fileRelativeUrlWithInvalidCharacter = this.documentLibrary + "/" +
                        this.fileName.Substring(0, this.fileName.IndexOf(".", System.StringComparison.CurrentCulture)) + invalidCharacter +
                        this.fileName.Substring(this.fileName.IndexOf(".", System.StringComparison.CurrentCulture));

                    try
                    {
                        this.protocolAdapterInstance.DeleteAllVersions(fileRelativeUrlWithInvalidCharacter);
                        Site.Assert.Fail(
                            "The deleteAllVersion operation should fail. The invalid character is {0}",
                            invalidCharacter);
                    }
                    catch (SoapException ex)
                    {
                        errorCode = Common.ExtractErrorCodeFromSoapFault(ex);
                        errorString = AdapterHelper.ExtractErrorStringFromSoapFault(ex);
                        Site.Log.Add(LogEntryKind.Debug, "The errorCode is {0}", errorCode);
                        if (invalidCharacter == "\"")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17202");

                                // Verify MS-VERSS requirement: MS-VERSS_R17202
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81020030",
                                    errorCode,
                                    17202,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Double quotation mark (""). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930103");

                                Site.CaptureRequirementIfAreEqual(
                                    "0x81070905",
                                    errorCode,
                                    1930103,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Double quotation mark (""). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "#")
                        {
                            if (Common.IsRequirementEnabled(1930213, this.Site))
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930213");

                                Site.Assert.IsNull(errorCode, "The errorCode is {0}.", errorCode);

                                // Verify MS-VERSS requirement: MS-VERSS_R1930213
                                Site.CaptureRequirementIfIsNotNull(
                                    errorString,
                                    1930213,
                                    @"[In Appendix B: Product Behavior] Implementation does return a SOAP exception. (<4> Section 3.1.4.1.2.2:  [Windows SharePoint Services truncates all characters after the first ""#"" in the file name. ] If the truncated file name does not exist on the server, SharePoint Foundation 2010 and SharePoint Foundation 2013 returns a SOAP server exception.)");
                            }

                            if (Common.IsRequirementEnabled(1930203, this.Site))
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930203");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930203
                                Site.CaptureRequirementIfAreEqual(
                                    "0x81070906",
                                    errorCode,
                                    1930203,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070906. (<4> Section 3.1.4.1.2.2:  [Windows SharePoint Services truncates all characters after the first ""#"" in the file name. ] If the truncated file name does not exist on the server, Windows SharePoint Services 3.0 returns the 0x81070906 error code.)");
                            }
                        }
                        else if (invalidCharacter == "%")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17205");

                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81020030",
                                    errorCode,
                                    17205,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Percent sign (%). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930105");

                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930105,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Percent sign (%). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "&")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17206");

                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81020030",
                                    errorCode,
                                    17206,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Ampersand (&). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930106");

                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930106,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Ampersand (&). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "*")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17207");

                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81020030",
                                    errorCode,
                                    17207,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Asterisk (*). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930107");

                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930107,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Asterisk (*). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == ":")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17208");

                                Site.CaptureRequirementIfAreEqual<string>(
                                        "0x81020030",
                                        errorCode,
                                        17208,
                                        @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Colon (:). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930108");

                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930108,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Colon (:). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "<")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17209");

                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81020030",
                                    errorCode,
                                    17209,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Left angle bracket (<). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930109");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930109
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930109,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Left angle bracket (<). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "=")
                        {
                            if (Common.IsRequirementEnabled(1930208, this.Site))
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930208");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930208
                                Site.CaptureRequirementIfIsNull(
                                    errorCode,
                                    1930208,
                                    @"[In Appendix B: Product Behavior] Implementation does return a SOAP exception without an error code if fileName contains equals sign (=). (<4> Section 3.1.4.1.2.2: If fileName contains equals sign (=), SharePoint Foundation 2010 and SharePoint Foundation 2013 return a SOAP exception without an error code.)");
                            }
                        }
                        else if (invalidCharacter == ">")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17211");

                                // Verify MS-VERSS requirement: MS-VERSS_R17211
                                Site.CaptureRequirementIfAreEqual<string>(
                                        "0x81020030",
                                        errorCode,
                                        17211,
                                        @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Right angle bracket (>). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930111");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930111
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930111,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Right angle bracket (>). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "?")
                        {
                            if (Common.IsRequirementEnabled(1930214, this.Site))
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930214");

                                Site.Assert.IsNull(errorCode, "The errorCode is {0}.", errorCode);

                                // Verify MS-VERSS requirement: MS-VERSS_R1930214
                                Site.CaptureRequirementIfIsNotNull(
                                    errorString,
                                        1930214,
                                        @"[In Appendix B: Product Behavior] Implementation does return a SOAP exception. (<4> Section 3.1.4.1.2.2:  [Windows SharePoint Services truncates all characters after the first ""?"" in the file name. ] If the truncated file name does not exist on the server, SharePoint Foundation 2010 and SharePoint Foundation 2013 returns a SOAP server exception.)");
                            }

                            if (Common.IsRequirementEnabled(1930204, this.Site))
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930204");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930204
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070906",
                                    errorCode,
                                    1930204,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070906. (<4> Section 3.1.4.1.2.2:  [Windows SharePoint Services truncates all characters after the first ""?"" in the file name. ] If the truncated file name does not exist on the server, Windows SharePoint Services 3.0 returns the 0x81070906 error code.)");
                            }
                        }
                        else if (invalidCharacter == "{")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17214");

                                // Verify MS-VERSS requirement: MS-VERSS_R17214
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81020030",
                                    errorCode,
                                    17214,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Left curly bracket ({). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930114");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930114
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930114,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Left curly bracket ({). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "|")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17215");

                                // Verify MS-VERSS requirement: MS-VERSS_R17215
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81020030",
                                    errorCode,
                                    17215,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Vertical bar (|). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930116");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930116
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930116,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Vertical bar (|). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "}")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17216");

                                // Verify MS-VERSS requirement: MS-VERSS_R17216
                                Site.CaptureRequirementIfAreEqual<string>(
                                        "0x81020030",
                                        errorCode,
                                        17216,
                                        @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Right curly bracket (}). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930117");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930117
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930117,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Right curly bracket (}). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "~")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17217");

                                // Verify MS-VERSS requirement: MS-VERSS_R17217
                                Site.CaptureRequirementIfAreEqual<string>(
                                        "0x81020030",
                                        errorCode,
                                        17217,
                                        @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Tilde (~). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930118");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930118
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930118,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Tilde (~). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "..")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17218");

                                // Verify MS-VERSS requirement: MS-VERSS_R17218
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81020030",
                                    errorCode,
                                    17218,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Two consecutive dots (..). (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930119");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930119
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930119,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Two consecutive dots (..). (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "\t")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17219");

                                // Verify MS-VERSS requirement: MS-VERSS_R17219
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81020030",
                                    errorCode,
                                    17219,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character tab(\t), it is not at the end of the fileName. (SharePoint Foundation 2010 and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930113");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930113
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930113,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character Tab (\t), it is not at the end of the fileName. (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                        else if (invalidCharacter == "\n" || invalidCharacter == "\r")
                        {
                            if (isR17201Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R17220");

                                // Verify MS-VERSS requirement: MS-VERSS_R17220
                                Site.CaptureRequirementIfAreEqual<string>(
                                        "0x81020030",
                                        errorCode,
                                        17220,
                                        @"[In Appendix B: Product Behavior] Implementation does return error code 0x81020030 to indicate that the fileName element of the DeleteAllVersions element contains invalid character that has a value less than 32 or greater than 126. (SharePoint Foundation 2010  and above follow this behavior.)");
                            }

                            if (isR1930101Enabled)
                            {
                                // Add the debug information
                                Site.Log.Add(LogEntryKind.Debug, "Verify MS-VERSS_R1930120");

                                // Verify MS-VERSS requirement: MS-VERSS_R1930120
                                Site.CaptureRequirementIfAreEqual<string>(
                                    "0x81070905",
                                    errorCode,
                                    1930120,
                                    @"[In Appendix B: Product Behavior] Implementation does return error code 0x81070905 to indicate that the fileName element of the DeleteAllVersions element contains invalid character that has a value less than 32 or greater than 126. (<3> Section 3.1.4.1.2.2: Windows SharePoint Services 3.0 returns the 0x81070905 error code for invalid characters.)");
                            }
                        }
                    }
                }
            }
        }