Ejemplo n.º 1
0
        /// <summary>
        /// Compare the collection items
        /// </summary>
        /// <param name="obj">other collection</param>
        /// <returns>true if the collections contain the same items</returns>
        public override bool Equals(object obj)
        {
            WorkItemCollection other = obj as WorkItemCollection;
            bool result = false;

            if (other == null)
            {
                result = false;
            }
            else if (object.ReferenceEquals(this, other))
            {
                result = true;
            }
            else if (this.Count != other.Count)
            {
                result = false;
            }
            else
            {
                foreach (WorkItem item in this)
                {
                    if (!other.Contains(item))
                    {
                        result = false;
                        break;
                    }
                }
            }

            return(result);
        }
Ejemplo n.º 2
0
 private void Initialize()
 {
     this.id                = TestId.Empty;
     this.name              = string.Empty;
     this.owner             = string.Empty;
     this.priority          = DefaultPriority;
     this.storage           = string.Empty;
     this.executionId       = TestExecId.Empty;
     this.parentExecutionId = TestExecId.Empty;
     this.testCategories    = new TestCategoryItemCollection();
     this.workItems         = new WorkItemCollection();
     this.isRunnable        = true;
     this.catId             = TestListCategoryId.Uncategorized;
 }