public void TestCase_S14_TC02_AllocateExtendedGuidRange_ReservedIgnore() { // Initialize the service this.InitializeContext(this.DefaultFileUrl, this.UserName01, this.Password01, this.Domain); FsshttpbCellRequest fsshttpRequest = SharedTestSuiteHelper.CreateFsshttpbCellRequest(); AllocateExtendedGuidRangeCellSubRequest allocateExtendedGuidRange = new AllocateExtendedGuidRangeCellSubRequest(new Compact64bitInt(8000), SequenceNumberGenerator.GetCurrentFSSHTTPBSubRequestID()); // Make the reserved value equal to 0. allocateExtendedGuidRange.Reserved = 0; fsshttpRequest.AddSubRequest(allocateExtendedGuidRange, null); CellSubRequestType cellSubRequest = SharedTestSuiteHelper.CreateCellSubRequest((ulong)SequenceNumberGenerator.GetCurrentToken(), fsshttpRequest.ToBase64()); CellStorageResponse response = this.Adapter.CellStorageRequest(this.DefaultFileUrl, new SubRequestType[] { cellSubRequest }); CellSubResponseType cellSubResponse = SharedTestSuiteHelper.ExtractSubResponse <CellSubResponseType>(response, 0, 0, this.Site); this.Site.Assert.AreEqual <ErrorCodeType>( ErrorCodeType.Success, SharedTestSuiteHelper.ConvertToErrorCodeType(cellSubResponse.ErrorCode, this.Site), "Test case cannot continue unless the allocate extended guid range operation on the file {0} succeed.", this.DefaultFileUrl); FsshttpbResponse fsshttpbResponse = SharedTestSuiteHelper.ExtractFsshttpbResponse(cellSubResponse, this.Site); SharedTestSuiteHelper.ExpectMsfsshttpbSubResponseSucceed(fsshttpbResponse, this.Site); FsshttpbCellRequest fsshttpRequestSecond = SharedTestSuiteHelper.CreateFsshttpbCellRequest(); AllocateExtendedGuidRangeCellSubRequest allocateExtendedGuidRangeSecond = new AllocateExtendedGuidRangeCellSubRequest(new Compact64bitInt(8000), SequenceNumberGenerator.GetCurrentFSSHTTPBSubRequestID()); // Make the reserved value equal to 1. allocateExtendedGuidRangeSecond.Reserved = 1; fsshttpRequestSecond.AddSubRequest(allocateExtendedGuidRangeSecond, null); CellSubRequestType cellSubRequestSecond = SharedTestSuiteHelper.CreateCellSubRequest((ulong)SequenceNumberGenerator.GetCurrentToken(), fsshttpRequestSecond.ToBase64()); CellStorageResponse responseSecond = this.Adapter.CellStorageRequest(this.DefaultFileUrl, new SubRequestType[] { cellSubRequestSecond }); CellSubResponseType cellSubResponseSecond = SharedTestSuiteHelper.ExtractSubResponse <CellSubResponseType>(responseSecond, 0, 0, this.Site); this.Site.Assert.AreEqual <ErrorCodeType>( ErrorCodeType.Success, SharedTestSuiteHelper.ConvertToErrorCodeType(cellSubResponseSecond.ErrorCode, this.Site), "Test case cannot continue unless the allocate extended guid range operation on the file {0} succeed.", this.DefaultFileUrl); FsshttpbResponse fsshttpbResponseSecond = SharedTestSuiteHelper.ExtractFsshttpbResponse(cellSubResponseSecond, this.Site); SharedTestSuiteHelper.ExpectMsfsshttpbSubResponseSucceed(fsshttpbResponseSecond, this.Site); // Compare this two responses roughly, and if these two responses are identical in main part, then capture the requirement MS-FSSHTTPB_R2189 bool isVerifyR2189 = SharedTestSuiteHelper.ComapreSucceedFsshttpAllocateExtendedGuidRangeResposne(fsshttpbResponse, fsshttpbResponseSecond, this.Site); this.Site.Log.Add(TestTools.LogEntryKind.Debug, "Expect the two allocate extended GUID range responses are same, actual {0}", isVerifyR2189); if (SharedContext.Current.IsMsFsshttpRequirementsCaptured) { // Verify MS-FSSHTTPB requirement: MS-FSSHTTPB_R2189 Site.CaptureRequirementIfIsTrue( isVerifyR2189, "MS-FSSHTTPB", 2189, @"[In Allocate Extended GUID Range] A - Reserved (8 bits): Whenever A - Reserved is set to one or zero, the protocol server must return the same response."); } else { Site.Assert.IsTrue( isVerifyR2189, @"[In Allocate Extended GUID Range] A - Reserved (8 bits): Whenever A - Reserved is set to one or zero, the protocol server must return the same response."); } }
public void TestCase_S14_TC02_AllocateExtendedGuidRange_ReservedIgnore() { // Initialize the service this.InitializeContext(this.DefaultFileUrl, this.UserName01, this.Password01, this.Domain); FsshttpbCellRequest fsshttpRequest = SharedTestSuiteHelper.CreateFsshttpbCellRequest(); AllocateExtendedGuidRangeCellSubRequest allocateExtendedGuidRange = new AllocateExtendedGuidRangeCellSubRequest(new Compact64bitInt(8000), SequenceNumberGenerator.GetCurrentFSSHTTPBSubRequestID()); // Make the reserved value equal to 0. allocateExtendedGuidRange.Reserved = 0; fsshttpRequest.AddSubRequest(allocateExtendedGuidRange, null); CellSubRequestType cellSubRequest = SharedTestSuiteHelper.CreateCellSubRequest((ulong)SequenceNumberGenerator.GetCurrentToken(), fsshttpRequest.ToBase64()); CellStorageResponse response = this.Adapter.CellStorageRequest(this.DefaultFileUrl, new SubRequestType[] { cellSubRequest }); CellSubResponseType cellSubResponse = SharedTestSuiteHelper.ExtractSubResponse<CellSubResponseType>(response, 0, 0, this.Site); this.Site.Assert.AreEqual<ErrorCodeType>( ErrorCodeType.Success, SharedTestSuiteHelper.ConvertToErrorCodeType(cellSubResponse.ErrorCode, this.Site), "Test case cannot continue unless the allocate extended guid range operation on the file {0} succeed.", this.DefaultFileUrl); FsshttpbResponse fsshttpbResponse = SharedTestSuiteHelper.ExtractFsshttpbResponse(cellSubResponse, this.Site); SharedTestSuiteHelper.ExpectMsfsshttpbSubResponseSucceed(fsshttpbResponse, this.Site); FsshttpbCellRequest fsshttpRequestSecond = SharedTestSuiteHelper.CreateFsshttpbCellRequest(); AllocateExtendedGuidRangeCellSubRequest allocateExtendedGuidRangeSecond = new AllocateExtendedGuidRangeCellSubRequest(new Compact64bitInt(8000), SequenceNumberGenerator.GetCurrentFSSHTTPBSubRequestID()); // Make the reserved value equal to 1. allocateExtendedGuidRangeSecond.Reserved = 1; fsshttpRequestSecond.AddSubRequest(allocateExtendedGuidRangeSecond, null); CellSubRequestType cellSubRequestSecond = SharedTestSuiteHelper.CreateCellSubRequest((ulong)SequenceNumberGenerator.GetCurrentToken(), fsshttpRequestSecond.ToBase64()); CellStorageResponse responseSecond = this.Adapter.CellStorageRequest(this.DefaultFileUrl, new SubRequestType[] { cellSubRequestSecond }); CellSubResponseType cellSubResponseSecond = SharedTestSuiteHelper.ExtractSubResponse<CellSubResponseType>(responseSecond, 0, 0, this.Site); this.Site.Assert.AreEqual<ErrorCodeType>( ErrorCodeType.Success, SharedTestSuiteHelper.ConvertToErrorCodeType(cellSubResponseSecond.ErrorCode, this.Site), "Test case cannot continue unless the allocate extended guid range operation on the file {0} succeed.", this.DefaultFileUrl); FsshttpbResponse fsshttpbResponseSecond = SharedTestSuiteHelper.ExtractFsshttpbResponse(cellSubResponseSecond, this.Site); SharedTestSuiteHelper.ExpectMsfsshttpbSubResponseSucceed(fsshttpbResponseSecond, this.Site); // Compare this two responses roughly, and if these two responses are identical in main part, then capture the requirement MS-FSSHTTPB_R2189 bool isVerifyR2189 = SharedTestSuiteHelper.ComapreSucceedFsshttpAllocateExtendedGuidRangeResposne(fsshttpbResponse, fsshttpbResponseSecond, this.Site); this.Site.Log.Add(TestTools.LogEntryKind.Debug, "Expect the two allocate extended GUID range responses are same, actual {0}", isVerifyR2189); if (SharedContext.Current.IsMsFsshttpRequirementsCaptured) { // Verify MS-FSSHTTPB requirement: MS-FSSHTTPB_R2189 Site.CaptureRequirementIfIsTrue( isVerifyR2189, "MS-FSSHTTPB", 2189, @"[In Allocate Extended GUID Range] A - Reserved (8 bits): Whenever A - Reserved is set to one or zero, the protocol server must return the same response."); } else { Site.Assert.IsTrue( isVerifyR2189, @"[In Allocate Extended GUID Range] A - Reserved (8 bits): Whenever A - Reserved is set to one or zero, the protocol server must return the same response."); } }