Microsoft.Protocols.TestSuites.SharedTestSuite.S07_EditorsTable.TestCase_S07_TC10_EditorsTable_Support C# (CSharp) Method

TestCase_S07_TC10_EditorsTable_Support() private method

private TestCase_S07_TC10_EditorsTable_Support ( ) : void
return void
        public void TestCase_S07_TC10_EditorsTable_Support()
        {
            // Initialize the service
            string url = Common.GetConfigurationPropertyValue("NormalFile", this.Site);
            this.InitializeContext(url, this.UserName01, this.Password01, this.Domain);

            // Send a serverTimeSubRequest to get the current MinorVersion value.
            ServerTimeSubRequestType serverTimeSubRequest = SharedTestSuiteHelper.CreateServerTimeSubRequest(SequenceNumberGenerator.GetCurrentToken());
            CellStorageResponse cellStoreageResponse = Adapter.CellStorageRequest(url, new SubRequestType[] { serverTimeSubRequest });
            ServerTimeSubResponseType subResponse = SharedTestSuiteHelper.ExtractSubResponse<ServerTimeSubResponseType>(cellStoreageResponse, 0, 0, this.Site);
            this.Site.Assert.AreEqual<ErrorCodeType>(
                        ErrorCodeType.Success,
                        SharedTestSuiteHelper.ConvertToErrorCodeType(subResponse.ErrorCode, this.Site),
                        "Test case cannot continue unless the serverTime request succeeds.");

            if (cellStoreageResponse.ResponseVersion.MinorVersion == 2)
            {
                // Create a join editor session object.
                EditorsTableSubRequestType join = SharedTestSuiteHelper.CreateEditorsTableSubRequestForJoinSession(SharedTestSuiteHelper.DefaultClientID, SharedTestSuiteHelper.DefaultTimeOut);

                // Call protocol adapter operation CellStorageRequest to join the editing session.
                CellStorageResponse cellStorageResponseJoin = this.Adapter.CellStorageRequest(url, new SubRequestType[] { join });

                // Get the subResponse of EditorsTableSubResponseType
                EditorsTableSubResponseType subResponseJoin = SharedTestSuiteHelper.ExtractSubResponse<EditorsTableSubResponseType>(cellStorageResponseJoin, 0, 0, this.Site);

                if (SharedContext.Current.IsMsFsshttpRequirementsCaptured)
                {
                    // If the ErrorCode attribute returned equals "Success", then MS-FSSHTTP_R1703 can be covered.
                    Site.CaptureRequirementIfAreEqual<ErrorCodeType>(
                             ErrorCodeType.Success,
                             SharedTestSuiteHelper.ConvertToErrorCodeType(subResponseJoin.ErrorCode, this.Site),
                             "MS-FSSHTTP",
                             1703,
                             @"[In MinorVersionNumberType][The value of MinorVersionNumberType] 2: In responses, indicates that the protocol server is capable of managing the editors table.");
                }
                else
                {
                    Site.Assert.AreEqual<ErrorCodeType>(
                        ErrorCodeType.Success,
                        SharedTestSuiteHelper.ConvertToErrorCodeType(subResponseJoin.ErrorCode, this.Site),
                        @"[In MinorVersionNumberType][The value of MinorVersionNumberType] 2: In responses, indicates that the protocol server is capable of managing the editors table.");
                }

                this.StatusManager.RecordEditorTable(url, SharedTestSuiteHelper.DefaultClientID);
            }
            else
            {
                Site.Assume.Inconclusive(string.Format("This test case is only valuable when the MinorVersion value is 2, but the actual MinorVersion is {0}", cellStoreageResponse.ResponseVersion.MinorVersion));
            }
        }