private void InitializeClientsConnections(Smb2CreateRequestLease client1RequestLease, Smb2CreateRequestLease client2RequestLease, out Smb2CreateResponseLease client1ResponseLease,
                                                  out Smb2CreateResponseLease 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 Smb2CreateResponseLease;
            client2ResponseLease = client2ResponseContext as Smb2CreateResponseLease;
        }
Esempio n. 2
0
        public override void Check(Smb2CreateContextResponse response)
        {
            base.Check(response);
            Smb2CreateResponseLease leaseResponse = response as Smb2CreateResponseLease;

            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.LeaseFlags, "LeaseFlag in the response is expected to be {0}. The actual value is {1}.", leaseFlag, leaseResponse.LeaseFlags);
            TestSite.CaptureRequirementIfAreEqual <ulong>(0, leaseResponse.LeaseDuration,
                                                          RequirementCategory.MUST_BE_ZERO.Id,
                                                          RequirementCategory.MUST_BE_ZERO.Description);
        }