Microsoft.Protocols.TestSuites.MS_LISTSWS.S05_OperationOnFiles.MSLISTSWS_S05_TC07_CheckOutFile_Succeed C# (CSharp) Method

MSLISTSWS_S05_TC07_CheckOutFile_Succeed() private method

private MSLISTSWS_S05_TC07_CheckOutFile_Succeed ( ) : void
return void
        public void MSLISTSWS_S05_TC07_CheckOutFile_Succeed()
        {
            string listTitle = TestSuiteHelper.GetUniqueListName();
            int docLibraryTemplateId = (int)TemplateType.Document_Library;
            TestSuiteHelper.CreateList(listTitle, docLibraryTemplateId);

            // Upload the file to the document library
            string absoluteFileUrl = this.sutControlAdapter.UploadFile(listTitle);
            Site.Assert.IsTrue(
                        !string.IsNullOrEmpty(absoluteFileUrl),
                        "Upload file to the list {0} should be successful, the file path is [{1}]",
                        listTitle,
                        absoluteFileUrl);

            #region Check out the added file with all valid parameters.

            bool isCheckout = false;

            isCheckout = this.listwsInstance.CheckOutFile(absoluteFileUrl, "False", null);
            #endregion

            #region Capture R16611, R412 and R1679 if the CheckOutFile succeeds and returns true value.

            // Verify requirement R16611.
            // If there are no other errors, it means implementation does support this CheckOutFile method. R16611 can be captured.
            if (Common.IsRequirementEnabled(16611, this.Site))
            {
                Site.CaptureRequirementIfIsTrue(
                    isCheckout,
                    16611,
                    @"Implementation does support this method[CheckOutFile]. (Windows SharePoint Services 3.0 and above follow this behavior.)");
            }

            Site.CaptureRequirementIfIsTrue(
                isCheckout,
                412,
                @"[In CheckOutFile operation] If there are no other errors, the document located at pageUrl MUST be checked out by using checkoutToLocal and last modified as specified in the CheckOutFileSoapIn request message.");

            Site.CaptureRequirementIfIsTrue(
                isCheckout,
                1679,
                @"[CheckOutFileResponse]The value is True if the operation is successful;");
            #endregion
        }