public void UnpackTest() { CommunicationStream stream = EventTestingUtilities.BuildStream( 1, 15, 15 ); goalComs.SetStream(stream); goToEvent = new GoToEvent(); List<Point> nodes = (List<Point>)EventTestingUtilities.GetInstanceField(typeof(GoToEvent), goToEvent, "locations"); Assert.AreEqual(new Point(1, 1), nodes[0]); }
/// <summary> /// Returns true if the given object is a GoToEvent and contains the same list of locations as this one. /// </summary> /// <param name="obj">An object.</param> /// <returns>True if the objects are equal.</returns> public override bool Equals(object obj) { if (!(obj is GoToEvent)) { return(false); } GoToEvent other = (GoToEvent)obj; return(this.locations.SequenceEqual(other.locations)); }
public void Init() { goToEvent = new GoToEvent(new Point(1, 1)); }