Microsoft.Protocols.TestSuites.MS_OXCPERM.MS_OXCPERMAdapter.InitializePermissionList C# (CSharp) Method

InitializePermissionList() public method

Initialize the permission list.
public InitializePermissionList ( ) : void
return void
        public void InitializePermissionList()
        {
            if (Common.GetConfigurationPropertyValue("TransportSeq", this.Site).ToLower() == "mapi_http" && !Common.IsRequirementEnabled(1184, this.Site))
            {
                Site.Assert.Inconclusive("This case can not run with MAPIHTTP transport with current SUT version. Only Exchange 2013 SP1 supports MAPIHTTP transport.");
            }

            this.currentLogonUser = string.Empty;
            this.sutControlAdapter = Site.GetAdapter<IMS_OXCPERMSUTControlAdapter>();

            parses = new Dictionary<int, IPropertyInterface>();
            this.RegisterToParses();
            uint responseValue = 0;

            // The user configured by "AdminUserName" logons to his own mailbox to retrieve or modify the permissions.
            this.Logon(this.User2);

            // Retrieve the permissions list to restore.
            RequestBufferFlags bufferFlags = new RequestBufferFlags
            {
                IsIncludeFreeBusyFlagSet = true
            };

            FolderTypeEnum folderType = FolderTypeEnum.CommonFolderType;
            this.rawData = null;
            uint status;

            uint folderHandle = this.GetFolderObjectHandle(folderType);

            status = this.RetrievePermissionsList(folderType, folderHandle, bufferFlags);
            Site.Assert.AreEqual<uint>(UINT32SUCCESS, status, "0 indicates querying permission data operates successfully.");

            bool completeToParse = this.ParseUserListFromRawData(out this.originalPermissionsList, ref this.rawData);
            Site.Assert.IsTrue(completeToParse, "True indicates the permissions list is parsed successfully.");

            this.currentPermissionsList = this.originalPermissionsList;

            responseValue = this.RemovePermission(folderType, this.User1, bufferFlags);
            Site.Assert.AreEqual<uint>(UINT32SUCCESS, responseValue, "0 indicates the server removes permission successfully.");
        }
MS_OXCPERMAdapter