public void Index2ShortestDistanceMethodenTest() { Index2 size = new Index2(20, 20); Index2 i1 = new Index2(5, 7); // Startwert Index2 i2 = new Index2(12, 13); // Destinations Index2 i3 = new Index2(7, 6); // Results Assert.Equals(i3.X, i1.ShortestDistanceX(i2.X, size.X)); Assert.Equals(i3.Y, i1.ShortestDistanceY(i2.Y, size.Y)); Assert.Equals(i3, i1.ShortestDistanceXY(i2, size)); }
public void Index2ShortestDistanceMethodenTest() { Index2 size = new Index2(20, 20); Index2 i1 = new Index2(5, 7); // Startwert Index2 i2 = new Index2(12, 13); // Destinations Index2 i3 = new Index2(7, 6); // Results Assert.AreEqual(i3.X, i1.ShortestDistanceX(i2.X, size.X)); Assert.AreEqual(i3.Y, i1.ShortestDistanceY(i2.Y, size.Y)); Assert.AreEqual(i3, i1.ShortestDistanceXY(i2, size)); }