Exemple #1
0
 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]);
 }
Exemple #2
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));
        }
Exemple #3
0
 public void Init()
 {
     goToEvent = new GoToEvent(new Point(1, 1));
 }