示例#1
0
        public void MSSHDACCWS_S01_TC04_FileNotExistOnServer()
        {
            // Call method IsOnlyClient with the identifier of the document that specified by the id can't be found on the server.
            bool nonExistStatus = SHDACCWSAdapter.IsOnlyClient(Guid.NewGuid());

            // If server returns "true", then capture MS-SHDACCWS requirement: MS-SHDACCWS_R57.
            this.Site.CaptureRequirementIfIsTrue(
                nonExistStatus,
                57,
                @"[In IsOnlyClientResponse] IsOnlyClientResult : If the file specified by the input id can't be found on server, the value [IsOnlyClientResult] MUST be true.");
        }
        public void MSSHDACCWS_S01_TC02_NoClientAuthoring()
        {
            // Get an identifier of the document that no client is editing it.
            string fileIdOfNormal = Common.GetConfigurationPropertyValue("fileIdOfNormal", this.Site);

            // Call method IsOnlyClient with the identifier of the document that no client is editing it.
            bool normalStatus = SHDACCWSAdapter.IsOnlyClient(Guid.Parse(fileIdOfNormal));

            // If server returns "true", then capture MS-SHDACCWS requirement: MS-SHDACCWS_R55.
            this.Site.CaptureRequirementIfIsTrue(
                normalStatus,
                55,
                @"[In IsOnlyClientResponse] IsOnlyClientResult : If no client currently editing the file, the value [IsOnlyClientResult] MUST be true.");
        }
        public void MSSHDACCWS_S01_TC03_OnlyOneClientAuthoring()
        {
            // Set specified status of exclusive lock to the specified file which is identified by the property "FileIdOfLock".
            bool isSetExclusiveLockSuccess = SHDACCWSSUTControlAdapter.SUTSetExclusiveLock();

            Site.Assert.IsTrue(isSetExclusiveLockSuccess, "The 'Exclusive' lock status should be set on the specified file.");

            // Get an identifier of the document that is currently edited by one client.
            string fileIdOfLock = Common.GetConfigurationPropertyValue("FileIdOfLock", this.Site);

            // Call method IsOnlyClient with the identifier of the document that is currently edited by one client.
            bool lockStatus = SHDACCWSAdapter.IsOnlyClient(Guid.Parse(fileIdOfLock));

            // If server returns "true", then capture MS-SHDACCWS requirement: MS-SHDACCWS_R56.
            this.Site.CaptureRequirementIfIsTrue(
                lockStatus,
                56,
                @"[In IsOnlyClientResponse] IsOnlyClientResult : If only one client is allowed to edit the file with the ""Exclusive Lock"" mode , the value [IsOnlyClientResult] MUST be true.");
        }
示例#4
0
        public void MSSHDACCWS_S01_TC01_CoAuthoringIsAsked()
        {
            // Set the Co-authoring status for the specified file which is identified by the property "FileIdOfCoAuthoring".
            bool isSetCoauthoringSuccess = SHDACCWSSUTControlAdapter.SUTSetCoAuthoringStatus();

            Site.Assert.IsTrue(isSetCoauthoringSuccess, "The Co-authoring status should be set on the specified file.");

            // Get an identifier of the document which there was a co-authoring transition request for.
            string fileIdOfCoAuthoring = Common.GetConfigurationPropertyValue("fileIdOfCoAuthoring", this.Site);

            // Call method IsOnlyClient with the identifier of the document which there was a co-authoring transition request for.
            bool allCoAuthoringStatus = SHDACCWSAdapter.IsOnlyClient(Guid.Parse(fileIdOfCoAuthoring));

            // If server returns "false", then capture MS-SHDACCWS requirement: MS-SHDACCWS_R52.
            this.Site.CaptureRequirementIfIsFalse(
                allCoAuthoringStatus,
                52,
                @"[In IsOnlyClientResponse] IsOnlyClientResult : The value of this element MUST be false if there was a co-authoring transition request for the document.");
        }