Microsoft.Protocols.TestSuites.MS_ASAIRS.TestSuiteBase.RecordCaseRelativeItems C# (CSharp) Method

RecordCaseRelativeItems() protected method

Record the user name, folder collectionId and subjects the current test case impacts.
protected RecordCaseRelativeItems ( string userName, string folderCollectionId ) : void
userName string The user that current test case used.
folderCollectionId string The collectionId of folders that the current test case impact.
return void
        protected void RecordCaseRelativeItems(string userName, string folderCollectionId, params string[] itemSubjects)
        {
            // Record the item in the specified folder.
            CreatedItems createdItems = new CreatedItems { CollectionId = folderCollectionId };

            foreach (string subject in itemSubjects)
            {
                createdItems.ItemSubject.Add(subject);
            }

            // Record the created items of User1.
            if (userName == this.User1Information.UserName)
            {
                this.User1Information.UserCreatedItems.Add(createdItems);
            }

            // Record the created items of User2.
            if (userName == this.User2Information.UserName)
            {
                this.User2Information.UserCreatedItems.Add(createdItems);
            }
        }
        #endregion