Exploit database

GH-88d8bc551618926a04536090300b4292

dungnm24/cve-2020-0796

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2020-0796

81 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files53Next files →

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

WindowsProtocolTestSuites/TestSuites/FileServer/src/SMB2Model/TestSuite/LeaseOplockTestCase.cs

C# · 51,018 bytes
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.34014
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.TestSuite {
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Reflection;
    using Microsoft.Protocols.TestTools;
    using Microsoft.Protocols.TestTools.Messages.Runtime;

    [Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()]
    public partial class LeaseOplockTestCase : PtfTestClassBase {
        
        public LeaseOplockTestCase() {
            this.SetSwitch("ProceedControlTimeout", "100");
            this.SetSwitch("QuiescenceTimeout", "30000");
        }
        
        #region Expect Delegates
        public delegate void RequestOplockDelegate1();
        
        public delegate void VerificationDelegate1(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType breakType, Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values grantedOplockType, Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType grantedLeaseType);
        #endregion
        
        #region Event Metadata
        static System.Reflection.MethodBase RequestOplockInfo = TestManagerHelpers.GetMethodInfo(typeof(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.IMixedOplockLeaseAdapter), "RequestOplock", typeof(Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values));
        
        static System.Reflection.EventInfo VerificationInfo = TestManagerHelpers.GetEventInfo(typeof(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.IMixedOplockLeaseAdapter), "Verification");
        #endregion
        
        #region Adapter Instances
        private Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.IMixedOplockLeaseAdapter IMixedOplockLeaseAdapterInstance;
        #endregion
        
        #region Variables
        private IVariable<int> grantedLeaseType;
        
        private IVariable<int> v;
        #endregion
        
        #region Class Initialization and Cleanup
        [Microsoft.VisualStudio.TestTools.UnitTesting.ClassInitializeAttribute()]
        public static void ClassInitialize(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext context) {
            PtfTestClassBase.Initialize(context);
        }
        
        [Microsoft.VisualStudio.TestTools.UnitTesting.ClassCleanupAttribute()]
        public static void ClassCleanup() {
            PtfTestClassBase.Cleanup();
        }
        #endregion
        
        #region Test Initialization and Cleanup
        protected override void TestInitialize() {
            this.InitializeTestManager();
            this.IMixedOplockLeaseAdapterInstance = ((Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.IMixedOplockLeaseAdapter)(this.GetAdapter(typeof(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.IMixedOplockLeaseAdapter))));
            this.IMixedOplockLeaseAdapterInstance.Verification += IMixedOplockLeaseAdapterInstance_Verification;
            this.grantedLeaseType = this.Manager.CreateVariable<int>("grantedLeaseType");
            this.v = this.Manager.CreateVariable<int>("v");
        }

        private void IMixedOplockLeaseAdapterInstance_Verification(Adapter.MixedOplockLease.ModelBreakType breakType, TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values grantedOplockType, Adapter.MixedOplockLease.ModelLeaseStateType grantedLeaseType)
        {
            this.Manager.AddEvent(VerificationInfo, this.IMixedOplockLeaseAdapterInstance, new object[] { breakType, grantedOplockType, grantedLeaseType });
        }

        protected override void TestCleanup() {
            this.IMixedOplockLeaseAdapterInstance.Verification -= IMixedOplockLeaseAdapterInstance_Verification;
            base.TestCleanup();
            this.CleanupTestManager();
        }
        #endregion
        
        #region Test Starting in S0
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS0() {
            this.Manager.BeginTest("LeaseOplockTestCaseS0");
            this.Manager.Comment("reaching state \'S0\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S1\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S2\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_RW)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType.Lease_RW);
            this.Manager.Comment("reaching state \'S3\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S4\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_II)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(((Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values)(1)));
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS5();
            this.Manager.EndTest();
        }
        
        private void LeaseOplockTestCaseS5() {
            this.Manager.Comment("reaching state \'S5\'");
            this.Manager.ExpectReturn(this.QuiescenceTimeout, true, new ExpectedReturn(LeaseOplockTestCase.RequestOplockInfo, null, new RequestOplockDelegate1(this.LeaseOplockTestCaseS0RequestOplockChecker)));
            this.Manager.Comment("reaching state \'S6\'");
            if ((this.Manager.ExpectEvent(this.QuiescenceTimeout, true, new ExpectedEvent(LeaseOplockTestCase.VerificationInfo, null, new VerificationDelegate1(this.LeaseOplockTestCaseS0VerificationChecker))) != -1)) {
                this.Manager.Comment("reaching state \'S7\'");
            }
            else {
                this.Manager.CheckObservationTimeout(false, new ExpectedEvent(LeaseOplockTestCase.VerificationInfo, null, new VerificationDelegate1(this.LeaseOplockTestCaseS0VerificationChecker)));
            }
        }
        
        private void LeaseOplockTestCaseS0RequestOplockChecker() {
            this.Manager.Comment("checking step \'return RequestOplock\'");
        }
        
        private void LeaseOplockTestCaseS0VerificationChecker(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType breakType, Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values grantedOplockType, Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType grantedLeaseType) {
            this.Manager.Comment("checking step \'event Verification(LeaseBreak,OPLOCK_LEVEL_II,grantedLeaseType)\'");
            try {
                TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType>(this.Manager, Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType.LeaseBreak, breakType, "breakType of Verification, state S6");
                TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values>(this.Manager, ((Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values)(1)), grantedOplockType, "grantedOplockType of Verification, state S6");
                TestManagerHelpers.AssertBind<int>(this.Manager, this.grantedLeaseType, (System.Int32)grantedLeaseType, "grantedLeaseType of Verification, state S6");
            }
            catch (TransactionFailedException ) {
                this.Manager.Comment(@"This step would have covered ""[TestTag] Compatibility"", ""[TestInfo] The first client requests lease, and lease state is Lease_RW."", ""[TestInfo] Refer to the below matrix to check if lease break should exist and what the granted oplock level is."", ""[TestInfo] Note: the matrix is made based on Windows behavior"", ""[TestInfo] ================================================================================"", ""[TestInfo] 1st Client(Lease)	2nd Client(Oplock)	LeaseBreakExist	GrantedOplockLevel"", ""[TestInfo] ================================================================================"", ""[TestInfo] Lease_R		Any Oplock		No		OPLOCK_LEVEL_II"", ""[TestInfo] Lease_RH		Any Oplock		No		OPLOCK_LEVEL_NONE"", ""[TestInfo] Lease_RW		Any Oplock		Yes		OPLOCK_LEVEL_II"", ""[TestInfo] Lease_RWH		Any Oplock		Yes		OPLOCK_LEVEL_NONE"", ""[TestInfo] ================================================================================""");
                throw;
            }
            TestManagerHelpers.AssertBind<int>(this.Manager, this.v, this.grantedLeaseType, "v == grantedLeaseType");
            this.Manager.Checkpoint("\"[TestTag] Compatibility\"");
            this.Manager.Checkpoint("\"[TestInfo] The first client requests lease, and lease state is Lease_RW.\"");
            this.Manager.Checkpoint("\"[TestInfo] Refer to the below matrix to check if lease break should exist and wh" +
                    "at the granted oplock level is.\"");
            this.Manager.Checkpoint("\"[TestInfo] Note: the matrix is made based on Windows behavior\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Checkpoint("\"[TestInfo] 1st Client(Lease)\t2nd Client(Oplock)\tLeaseBreakExist\tGrantedOplockLev" +
                    "el\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_R\t\tAny Oplock\t\tNo\t\tOPLOCK_LEVEL_II\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RH\t\tAny Oplock\t\tNo\t\tOPLOCK_LEVEL_NONE\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RW\t\tAny Oplock\t\tYes\t\tOPLOCK_LEVEL_II\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RWH\t\tAny Oplock\t\tYes\t\tOPLOCK_LEVEL_NONE\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Comment("Unbinding variable \'grantedLeaseType\'");
            this.grantedLeaseType.Unbind();
        }
        #endregion
        
        #region Test Starting in S16
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS16() {
            this.Manager.BeginTest("LeaseOplockTestCaseS16");
            this.Manager.Comment("reaching state \'S16\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S17\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S18\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_R)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(((Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType)(1)));
            this.Manager.Comment("reaching state \'S19\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S20\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_BATCH)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values.OPLOCK_LEVEL_BATCH);
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS13();
            this.Manager.EndTest();
        }
        
        private void LeaseOplockTestCaseS13() {
            this.Manager.Comment("reaching state \'S13\'");
            this.Manager.ExpectReturn(this.QuiescenceTimeout, true, new ExpectedReturn(LeaseOplockTestCase.RequestOplockInfo, null, new RequestOplockDelegate1(this.LeaseOplockTestCaseS16RequestOplockChecker)));
            this.Manager.Comment("reaching state \'S14\'");
            if ((this.Manager.ExpectEvent(this.QuiescenceTimeout, true, new ExpectedEvent(LeaseOplockTestCase.VerificationInfo, null, new VerificationDelegate1(this.LeaseOplockTestCaseS16VerificationChecker))) != -1)) {
                this.Manager.Comment("reaching state \'S15\'");
            }
            else {
                this.Manager.CheckObservationTimeout(false, new ExpectedEvent(LeaseOplockTestCase.VerificationInfo, null, new VerificationDelegate1(this.LeaseOplockTestCaseS16VerificationChecker)));
            }
        }
        
        private void LeaseOplockTestCaseS16RequestOplockChecker() {
            this.Manager.Comment("checking step \'return RequestOplock\'");
        }
        
        private void LeaseOplockTestCaseS16VerificationChecker(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType breakType, Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values grantedOplockType, Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType grantedLeaseType) {
            this.Manager.Comment("checking step \'event Verification(NoBreak,OPLOCK_LEVEL_II,grantedLeaseType)\'");
            try {
                TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType>(this.Manager, ((Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType)(0)), breakType, "breakType of Verification, state S14");
                TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values>(this.Manager, ((Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values)(1)), grantedOplockType, "grantedOplockType of Verification, state S14");
                TestManagerHelpers.AssertBind<int>(this.Manager, this.grantedLeaseType, (System.Int32)grantedLeaseType, "grantedLeaseType of Verification, state S14");
            }
            catch (TransactionFailedException ) {
                this.Manager.Comment(@"This step would have covered ""[TestTag] Compatibility"", ""[TestInfo] The first client requests lease, and lease state is Lease_R."", ""[TestInfo] Refer to the below matrix to check if lease break should exist and what the granted oplock level is."", ""[TestInfo] Note: the matrix is made based on Windows behavior"", ""[TestInfo] ================================================================================"", ""[TestInfo] 1st Client(Lease)	2nd Client(Oplock)	LeaseBreakExist	GrantedOplockLevel"", ""[TestInfo] ================================================================================"", ""[TestInfo] Lease_R		Any Oplock		No		OPLOCK_LEVEL_II"", ""[TestInfo] Lease_RH		Any Oplock		No		OPLOCK_LEVEL_NONE"", ""[TestInfo] Lease_RW		Any Oplock		Yes		OPLOCK_LEVEL_II"", ""[TestInfo] Lease_RWH		Any Oplock		Yes		OPLOCK_LEVEL_NONE"", ""[TestInfo] ================================================================================""");
                throw;
            }
            TestManagerHelpers.AssertBind<int>(this.Manager, this.v, this.grantedLeaseType, "v == grantedLeaseType");
            this.Manager.Checkpoint("\"[TestTag] Compatibility\"");
            this.Manager.Checkpoint("\"[TestInfo] The first client requests lease, and lease state is Lease_R.\"");
            this.Manager.Checkpoint("\"[TestInfo] Refer to the below matrix to check if lease break should exist and wh" +
                    "at the granted oplock level is.\"");
            this.Manager.Checkpoint("\"[TestInfo] Note: the matrix is made based on Windows behavior\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Checkpoint("\"[TestInfo] 1st Client(Lease)\t2nd Client(Oplock)\tLeaseBreakExist\tGrantedOplockLev" +
                    "el\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_R\t\tAny Oplock\t\tNo\t\tOPLOCK_LEVEL_II\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RH\t\tAny Oplock\t\tNo\t\tOPLOCK_LEVEL_NONE\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RW\t\tAny Oplock\t\tYes\t\tOPLOCK_LEVEL_II\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RWH\t\tAny Oplock\t\tYes\t\tOPLOCK_LEVEL_NONE\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Comment("Unbinding variable \'grantedLeaseType\'");
            this.grantedLeaseType.Unbind();
            this.Manager.Comment("Unbinding variable \'v\'");
            this.v.Unbind();
        }
        #endregion
        
        #region Test Starting in S21
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS21() {
            this.Manager.BeginTest("LeaseOplockTestCaseS21");
            this.Manager.Comment("reaching state \'S21\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S22\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S23\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_RWH)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType.Lease_RWH);
            this.Manager.Comment("reaching state \'S24\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S25\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_EXCLUSIVE)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values.OPLOCK_LEVEL_EXCLUSIVE);
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS26();
            this.Manager.EndTest();
        }
        
        private void LeaseOplockTestCaseS26() {
            this.Manager.Comment("reaching state \'S26\'");
            this.Manager.ExpectReturn(this.QuiescenceTimeout, true, new ExpectedReturn(LeaseOplockTestCase.RequestOplockInfo, null, new RequestOplockDelegate1(this.LeaseOplockTestCaseS21RequestOplockChecker)));
            this.Manager.Comment("reaching state \'S27\'");
            if ((this.Manager.ExpectEvent(this.QuiescenceTimeout, true, new ExpectedEvent(LeaseOplockTestCase.VerificationInfo, null, new VerificationDelegate1(this.LeaseOplockTestCaseS21VerificationChecker))) != -1)) {
                this.Manager.Comment("reaching state \'S28\'");
            }
            else {
                this.Manager.CheckObservationTimeout(false, new ExpectedEvent(LeaseOplockTestCase.VerificationInfo, null, new VerificationDelegate1(this.LeaseOplockTestCaseS21VerificationChecker)));
            }
        }
        
        private void LeaseOplockTestCaseS21RequestOplockChecker() {
            this.Manager.Comment("checking step \'return RequestOplock\'");
        }
        
        private void LeaseOplockTestCaseS21VerificationChecker(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType breakType, Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values grantedOplockType, Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType grantedLeaseType) {
            this.Manager.Comment("checking step \'event Verification(LeaseBreak,OPLOCK_LEVEL_NONE,grantedLeaseType)\'" +
                    "");
            try {
                TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType>(this.Manager, Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType.LeaseBreak, breakType, "breakType of Verification, state S27");
                TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values>(this.Manager, ((Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values)(0)), grantedOplockType, "grantedOplockType of Verification, state S27");
                TestManagerHelpers.AssertBind<int>(this.Manager, this.grantedLeaseType, (System.Int32)grantedLeaseType, "grantedLeaseType of Verification, state S27");
            }
            catch (TransactionFailedException ) {
                this.Manager.Comment(@"This step would have covered ""[TestTag] Compatibility"", ""[TestInfo] The first client requests lease, and lease state is Lease_RWH."", ""[TestInfo] Refer to the below matrix to check if lease break should exist and what the granted oplock level is."", ""[TestInfo] Note: the matrix is made based on Windows behavior"", ""[TestInfo] ================================================================================"", ""[TestInfo] 1st Client(Lease)	2nd Client(Oplock)	LeaseBreakExist	GrantedOplockLevel"", ""[TestInfo] ================================================================================"", ""[TestInfo] Lease_R		Any Oplock		No		OPLOCK_LEVEL_II"", ""[TestInfo] Lease_RH		Any Oplock		No		OPLOCK_LEVEL_NONE"", ""[TestInfo] Lease_RW		Any Oplock		Yes		OPLOCK_LEVEL_II"", ""[TestInfo] Lease_RWH		Any Oplock		Yes		OPLOCK_LEVEL_NONE"", ""[TestInfo] ================================================================================""");
                throw;
            }
            TestManagerHelpers.AssertBind<int>(this.Manager, this.v, this.grantedLeaseType, "v == grantedLeaseType");
            this.Manager.Checkpoint("\"[TestTag] Compatibility\"");
            this.Manager.Checkpoint("\"[TestInfo] The first client requests lease, and lease state is Lease_RWH.\"");
            this.Manager.Checkpoint("\"[TestInfo] Refer to the below matrix to check if lease break should exist and wh" +
                    "at the granted oplock level is.\"");
            this.Manager.Checkpoint("\"[TestInfo] Note: the matrix is made based on Windows behavior\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Checkpoint("\"[TestInfo] 1st Client(Lease)\t2nd Client(Oplock)\tLeaseBreakExist\tGrantedOplockLev" +
                    "el\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_R\t\tAny Oplock\t\tNo\t\tOPLOCK_LEVEL_II\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RH\t\tAny Oplock\t\tNo\t\tOPLOCK_LEVEL_NONE\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RW\t\tAny Oplock\t\tYes\t\tOPLOCK_LEVEL_II\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RWH\t\tAny Oplock\t\tYes\t\tOPLOCK_LEVEL_NONE\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Comment("Unbinding variable \'grantedLeaseType\'");
            this.grantedLeaseType.Unbind();
            this.Manager.Comment("Unbinding variable \'v\'");
            this.v.Unbind();
        }
        #endregion
        
        #region Test Starting in S29
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS29() {
            this.Manager.BeginTest("LeaseOplockTestCaseS29");
            this.Manager.Comment("reaching state \'S29\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S30\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S31\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_RWH)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType.Lease_RWH);
            this.Manager.Comment("reaching state \'S32\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S33\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_BATCH)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values.OPLOCK_LEVEL_BATCH);
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS26();
            this.Manager.EndTest();
        }
        #endregion
        
        #region Test Starting in S34
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS34() {
            this.Manager.BeginTest("LeaseOplockTestCaseS34");
            this.Manager.Comment("reaching state \'S34\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S35\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S36\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_RH)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType.Lease_RH);
            this.Manager.Comment("reaching state \'S37\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S38\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_EXCLUSIVE)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values.OPLOCK_LEVEL_EXCLUSIVE);
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS39();
            this.Manager.EndTest();
        }
        
        private void LeaseOplockTestCaseS39() {
            this.Manager.Comment("reaching state \'S39\'");
            this.Manager.ExpectReturn(this.QuiescenceTimeout, true, new ExpectedReturn(LeaseOplockTestCase.RequestOplockInfo, null, new RequestOplockDelegate1(this.LeaseOplockTestCaseS34RequestOplockChecker)));
            this.Manager.Comment("reaching state \'S40\'");
            if ((this.Manager.ExpectEvent(this.QuiescenceTimeout, true, new ExpectedEvent(LeaseOplockTestCase.VerificationInfo, null, new VerificationDelegate1(this.LeaseOplockTestCaseS34VerificationChecker))) != -1)) {
                this.Manager.Comment("reaching state \'S41\'");
            }
            else {
                this.Manager.CheckObservationTimeout(false, new ExpectedEvent(LeaseOplockTestCase.VerificationInfo, null, new VerificationDelegate1(this.LeaseOplockTestCaseS34VerificationChecker)));
            }
        }
        
        private void LeaseOplockTestCaseS34RequestOplockChecker() {
            this.Manager.Comment("checking step \'return RequestOplock\'");
        }
        
        private void LeaseOplockTestCaseS34VerificationChecker(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType breakType, Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values grantedOplockType, Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType grantedLeaseType) {
            this.Manager.Comment("checking step \'event Verification(NoBreak,OPLOCK_LEVEL_NONE,grantedLeaseType)\'");
            try {
                TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType>(this.Manager, ((Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelBreakType)(0)), breakType, "breakType of Verification, state S40");
                TestManagerHelpers.AssertAreEqual<Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values>(this.Manager, ((Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values)(0)), grantedOplockType, "grantedOplockType of Verification, state S40");
                TestManagerHelpers.AssertBind<int>(this.Manager, this.grantedLeaseType, (System.Int32)grantedLeaseType, "grantedLeaseType of Verification, state S40");
            }
            catch (TransactionFailedException ) {
                this.Manager.Comment(@"This step would have covered ""[TestTag] Compatibility"", ""[TestInfo] The first client requests lease, and lease state is Lease_RH."", ""[TestInfo] Refer to the below matrix to check if lease break should exist and what the granted oplock level is."", ""[TestInfo] Note: the matrix is made based on Windows behavior"", ""[TestInfo] ================================================================================"", ""[TestInfo] 1st Client(Lease)	2nd Client(Oplock)	LeaseBreakExist	GrantedOplockLevel"", ""[TestInfo] ================================================================================"", ""[TestInfo] Lease_R		Any Oplock		No		OPLOCK_LEVEL_II"", ""[TestInfo] Lease_RH		Any Oplock		No		OPLOCK_LEVEL_NONE"", ""[TestInfo] Lease_RW		Any Oplock		Yes		OPLOCK_LEVEL_II"", ""[TestInfo] Lease_RWH		Any Oplock		Yes		OPLOCK_LEVEL_NONE"", ""[TestInfo] ================================================================================""");
                throw;
            }
            TestManagerHelpers.AssertBind<int>(this.Manager, this.v, this.grantedLeaseType, "v == grantedLeaseType");
            this.Manager.Checkpoint("\"[TestTag] Compatibility\"");
            this.Manager.Checkpoint("\"[TestInfo] The first client requests lease, and lease state is Lease_RH.\"");
            this.Manager.Checkpoint("\"[TestInfo] Refer to the below matrix to check if lease break should exist and wh" +
                    "at the granted oplock level is.\"");
            this.Manager.Checkpoint("\"[TestInfo] Note: the matrix is made based on Windows behavior\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Checkpoint("\"[TestInfo] 1st Client(Lease)\t2nd Client(Oplock)\tLeaseBreakExist\tGrantedOplockLev" +
                    "el\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_R\t\tAny Oplock\t\tNo\t\tOPLOCK_LEVEL_II\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RH\t\tAny Oplock\t\tNo\t\tOPLOCK_LEVEL_NONE\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RW\t\tAny Oplock\t\tYes\t\tOPLOCK_LEVEL_II\"");
            this.Manager.Checkpoint("\"[TestInfo] Lease_RWH\t\tAny Oplock\t\tYes\t\tOPLOCK_LEVEL_NONE\"");
            this.Manager.Checkpoint("\"[TestInfo] =====================================================================" +
                    "===========\"");
            this.Manager.Comment("Unbinding variable \'grantedLeaseType\'");
            this.grantedLeaseType.Unbind();
            this.Manager.Comment("Unbinding variable \'v\'");
            this.v.Unbind();
        }
        #endregion
        
        #region Test Starting in S42
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS42() {
            this.Manager.BeginTest("LeaseOplockTestCaseS42");
            this.Manager.Comment("reaching state \'S42\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S43\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S44\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_RH)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType.Lease_RH);
            this.Manager.Comment("reaching state \'S45\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S46\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_BATCH)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values.OPLOCK_LEVEL_BATCH);
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS39();
            this.Manager.EndTest();
        }
        #endregion
        
        #region Test Starting in S47
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS47() {
            this.Manager.BeginTest("LeaseOplockTestCaseS47");
            this.Manager.Comment("reaching state \'S47\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S48\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S49\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_RW)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType.Lease_RW);
            this.Manager.Comment("reaching state \'S50\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S51\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_EXCLUSIVE)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values.OPLOCK_LEVEL_EXCLUSIVE);
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS5();
            this.Manager.EndTest();
        }
        #endregion
        
        #region Test Starting in S52
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS52() {
            this.Manager.BeginTest("LeaseOplockTestCaseS52");
            this.Manager.Comment("reaching state \'S52\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S53\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S54\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_RW)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType.Lease_RW);
            this.Manager.Comment("reaching state \'S55\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S56\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_BATCH)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values.OPLOCK_LEVEL_BATCH);
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS5();
            this.Manager.EndTest();
        }
        #endregion
        
        #region Test Starting in S57
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS57() {
            this.Manager.BeginTest("LeaseOplockTestCaseS57");
            this.Manager.Comment("reaching state \'S57\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S58\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S59\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_R)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(((Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType)(1)));
            this.Manager.Comment("reaching state \'S60\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S61\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_II)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(((Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values)(1)));
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS13();
            this.Manager.EndTest();
        }
        #endregion
        
        #region Test Starting in S62
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS62() {
            this.Manager.BeginTest("LeaseOplockTestCaseS62");
            this.Manager.Comment("reaching state \'S62\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S63\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S64\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_RWH)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType.Lease_RWH);
            this.Manager.Comment("reaching state \'S65\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S66\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_II)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(((Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values)(1)));
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS26();
            this.Manager.EndTest();
        }
        #endregion
        
        #region Test Starting in S67
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS67() {
            this.Manager.BeginTest("LeaseOplockTestCaseS67");
            this.Manager.Comment("reaching state \'S67\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S68\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S69\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_RH)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType.Lease_RH);
            this.Manager.Comment("reaching state \'S70\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S71\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_II)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(((Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values)(1)));
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS39();
            this.Manager.EndTest();
        }
        #endregion
        
        #region Test Starting in S8
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod()]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Model)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Positive)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.Smb21)]
        [Microsoft.VisualStudio.TestTools.UnitTesting.TestCategory(Microsoft.Protocols.TestSuites.FileSharing.Common.Adapter.TestCategories.MixedOplockLease)]
        public void LeaseOplockTestCaseS8() {
            this.Manager.BeginTest("LeaseOplockTestCaseS8");
            this.Manager.Comment("reaching state \'S8\'");
            this.Manager.Comment("executing step \'call Preparation()\'");
            this.IMixedOplockLeaseAdapterInstance.Preparation();
            this.Manager.Comment("reaching state \'S9\'");
            this.Manager.Comment("checking step \'return Preparation\'");
            this.Manager.Comment("reaching state \'S10\'");
            this.Manager.Comment("executing step \'call RequestLease(Lease_R)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestLease(((Microsoft.Protocols.TestSuites.FileSharing.SMB2Model.Adapter.MixedOplockLease.ModelLeaseStateType)(1)));
            this.Manager.Comment("reaching state \'S11\'");
            this.Manager.Comment("checking step \'return RequestLease\'");
            this.Manager.Comment("reaching state \'S12\'");
            this.Manager.Comment("executing step \'call RequestOplock(OPLOCK_LEVEL_EXCLUSIVE)\'");
            this.IMixedOplockLeaseAdapterInstance.RequestOplock(Microsoft.Protocols.TestTools.StackSdk.FileAccessService.Smb2.OplockLevel_Values.OPLOCK_LEVEL_EXCLUSIVE);
            this.Manager.AddReturn(RequestOplockInfo, null);
            LeaseOplockTestCaseS13();
            this.Manager.EndTest();
        }
        #endregion
    }
}