ConstructDocFileFullUrl() 공개 정적인 메소드

Generate a doc full URL.
public static ConstructDocFileFullUrl ( Uri requestUrl, string docLibName, string docName ) : Uri
requestUrl System.Uri A Uri indicates the absolute URL for the site collection.
docLibName string The name of library in which a document will be created.
docName string The name of document that will be created.
리턴 System.Uri
        public void TestCaseInitialize()
        {
            this.sutControlAdapterInstance = this.Site.GetAdapter <IMS_VERSSSUTControlAdapter>();
            this.protocolAdapterInstance   = this.Site.GetAdapter <IMS_VERSSAdapter>();
            Common.CheckCommonProperties(this.Site, true);
            this.listsSutControlAdaterInstance = this.Site.GetAdapter <IMS_LISTSWSSUTControlAdapter>();

            #region Initialize the variables
            string datetimestamp = Common.FormatCurrentDateTime();

            this.requestUrl      = Common.GetConfigurationPropertyValue("RequestUrl", this.Site);
            this.documentLibrary = Common.GetConfigurationPropertyValue("DocumentLibraryName", this.Site) +
                                   "_" + datetimestamp;
            string fileNameValue = Common.GetConfigurationPropertyValue("FileName", this.Site);
            this.fileName = System.IO.Path.GetFileNameWithoutExtension(fileNameValue) +
                            "_" + datetimestamp +
                            System.IO.Path.GetExtension(fileNameValue);

            this.fileRelativeUrl = this.documentLibrary + "/" + this.fileName;
            Uri requestUri = new Uri(this.requestUrl);
            this.fileAbsoluteUrl = AdapterHelper.ConstructDocFileFullUrl(requestUri, this.documentLibrary, this.fileName);
            #endregion

            #region Initialize the server
            bool isAddList = this.listsSutControlAdaterInstance.AddList(this.documentLibrary);
            Site.Assume.IsTrue(
                isAddList,
                "AddList operation returns {0}, TRUE means the operation was executed successfully," +
                " FALSE means the operation failed",
                isAddList);
            #endregion

            this.testSuiteHelper = new TestSuiteHelper(
                this.Site,
                this.documentLibrary,
                this.fileName,
                this.listsSutControlAdaterInstance,
                this.protocolAdapterInstance,
                this.sutControlAdapterInstance);
        }
        /// <summary>
        /// Add one version to the file.
        /// </summary>
        /// <param name="specifiedFileName">A string indicates file name.</param>
        public void AddOneFileVersion(string specifiedFileName)
        {
            Uri  requestUri     = new Uri(this.requestUrl);
            Uri  fileUrl        = AdapterHelper.ConstructDocFileFullUrl(requestUri, this.documentLibrary, specifiedFileName);
            bool isCheckOutFile = this.listsSutControlAdaterInstance.CheckoutFile(fileUrl);

            this.site.Assert.IsTrue(
                isCheckOutFile,
                "CheckOutFile operation returns {0}, TRUE means the operation was executed successfully," +
                " FALSE means the operation failed",
                isCheckOutFile);

            bool isCheckInFile = this.listsSutControlAdaterInstance.CheckInFile(
                fileUrl,
                TestSuiteHelper.FileComments,
                ((int)VersionType.MinorCheckIn).ToString());

            this.site.Assert.IsTrue(
                isCheckInFile,
                "CheckInFile operation returns {0}, TRUE means the operation was executed successfully," +
                " FALSE means the operation failed",
                isCheckInFile);
        }