public void Well_In_Group_Border() { Well w = new Well("Well A", new Point(11, 6), new Point(2, 2)); bool expected = true; bool actual = w.IsInside(baseG); Assert.AreEqual(expected, actual); }
public void Well_Outside_Group() { Well w = new Well("Well A", new Point(12, 6), new Point(1, 1)); bool expected = false; bool actual = w.IsInside(baseG); Assert.AreEqual(expected, actual); }
/// <summary> /// Assign the passed Well to one of the groups added or to the default group if this Well don't reside inside any of the known groups. /// It also adds the well to the group's children list /// </summary> /// <param name="w">The Well to be analyzed</param> private void AssignWellToGroup(Well w) { foreach (Group g in app.GetGroups()) { if (w.IsInside(g)) { String uniqueName = g.GetName() + w.GetName(); w.SetUniqueName(uniqueName); g.AddChild(w); break; } } if (w.GetUniqueName() == null) { w.SetUniqueName(DEFAULT_GROUP_NAME + w.GetName()); } }