/// <summary> /// Add a TesteeRelationship to this Testee. Returns true if the name/context combination was /// added to the collection. Returns false if it already existed and was not added. /// </summary> /// <param name="r"></param> /// <returns></returns> public bool AddRelationship(TesteeRelationship r) { bool added = false; if (!TesteeRelationships.Contains(r)) { TesteeRelationships.Add(r); TesteeRelationships.Sort(); added = true; } return(added); }
/// <summary> /// Removes a TesteeRelationship from the collection /// </summary> /// <param name="r"></param> /// <returns></returns> public bool RemoveRelationship(TesteeRelationship r) { if (r == null) { return(false); } bool removed = false; if (TesteeRelationships.Contains(r)) { removed = TesteeRelationships.Remove(r); } return(removed); }