private static void ConnectToShare(
            ITestSite testSite,
            SMB2ModelTestConfig testConfig,
            Smb2FunctionalClient client,
            DialectRevision[] dialects,
            Guid clientGuid,
            AccountCredential account,
            out DialectRevision responseDialect,
            out uint treeId)
        {
            client.ConnectToServer(testConfig.UnderlyingTransport, testConfig.SutComputerName, testConfig.SutIPAddress);

            // Negotiate
            NEGOTIATE_Response?negotiateResponse = null;

            client.Negotiate(
                dialects,
                testConfig.IsSMB1NegotiateEnabled,
                clientGuid: clientGuid,
                checker: (header, response) =>
            {
                testSite.Assert.AreEqual(
                    Smb2Status.STATUS_SUCCESS,
                    header.Status,
                    "{0} should succeed", header.Command);

                negotiateResponse = response;
            });

            responseDialect = negotiateResponse.Value.DialectRevision;

            // SMB2 SESSION SETUP
            client.SessionSetup(
                testConfig.DefaultSecurityPackage,
                testConfig.SutComputerName,
                account,
                testConfig.UseServerGssToken);

            // SMB2 Tree Connect
            client.TreeConnect(
                Smb2Utility.GetUncPath(testConfig.SutComputerName, testConfig.BasicFileShare),
                out treeId);
        }
        private static void ConnectToShare(
            ITestSite testSite,
            SMB2ModelTestConfig testConfig,
            Smb2FunctionalClient client,
            DialectRevision[] dialects,
            Guid clientGuid,
            AccountCredential account,
            out DialectRevision responseDialect,
            out uint treeId)
        {
            client.ConnectToServer(testConfig.UnderlyingTransport, testConfig.SutComputerName, testConfig.SutIPAddress);

            // Negotiate
            NEGOTIATE_Response? negotiateResponse = null;
            client.Negotiate(
                dialects,
                testConfig.IsSMB1NegotiateEnabled,
                clientGuid: clientGuid,
                checker: (header, response) =>
                {
                    testSite.Assert.AreEqual(
                        Smb2Status.STATUS_SUCCESS,
                        header.Status,
                        "{0} should succeed", header.Command);

                    negotiateResponse = response;
                });

            responseDialect = negotiateResponse.Value.DialectRevision;

            // SMB2 SESSION SETUP
            client.SessionSetup(
                testConfig.DefaultSecurityPackage,
                testConfig.SutComputerName,
                account,
                testConfig.UseServerGssToken);

            // SMB2 Tree Connect
            client.TreeConnect(
                Smb2Utility.GetUncPath(testConfig.SutComputerName, testConfig.BasicFileShare),
                out treeId);
        }