private void InitializeClientsConnections(Smb2CreateRequestLeaseV2 client1RequestLease, Smb2CreateRequestLeaseV2 client2RequestLease, out Smb2CreateResponseLeaseV2 client1ResponseLease,
                                                  out Smb2CreateResponseLeaseV2 client2ResponseLease, bool isBothClientDirectory = false, bool isClient1ParentDirectory = false, bool expectServerBreakNotification = false)
        {
            Smb2CreateContextResponse client1ResponseContext;
            Smb2CreateContextResponse client2ResponseContext;

            SendRequestContext(client1RequestLease, client2RequestLease, out client1ResponseContext, out client2ResponseContext, isBothClientDirectory, isClient1ParentDirectory, expectServerBreakNotification);

            client1ResponseLease = client1ResponseContext as Smb2CreateResponseLeaseV2;
            client2ResponseLease = client2ResponseContext as Smb2CreateResponseLeaseV2;
        }
예제 #2
0
        public override void Check(Smb2CreateContextResponse response)
        {
            base.Check(response);
            Smb2CreateResponseLeaseV2 leaseResponse = response as Smb2CreateResponseLeaseV2;

            TestSite.Assert.AreEqual(leaseKey, leaseResponse.LeaseKey, "LeaseKey in the response is expected to be {0}. The actual value is {1}.", leaseKey, leaseResponse.LeaseKey);
            TestSite.Assert.AreEqual(leaseState, leaseResponse.LeaseState, "LeaseState in the response is expected to be {0}. The actual value is {1}.", leaseState, leaseResponse.LeaseState);
            TestSite.Assert.AreEqual(leaseFlag, leaseResponse.Flags, "LeaseFlag in the response is expected to be {0}. The actual value is {1}.", leaseFlag, leaseResponse.Flags);
            if (parentLeaseKey != default(Guid))
            {
                TestSite.Assert.AreEqual(parentLeaseKey, leaseResponse.ParentLeaseKey,
                                         "ParentLeaseKey in the response is expected to be {0}. The actual value is {1}.",
                                         parentLeaseKey, leaseResponse.ParentLeaseKey);
            }
            TestSite.CaptureRequirementIfAreEqual <ulong>(0, leaseResponse.LeaseDuration,
                                                          RequirementCategory.MUST_BE_ZERO.Id,
                                                          RequirementCategory.MUST_BE_ZERO.Description);
        }