public void Three_Verticals() { TrackLayout.AddTrack(1, 1); TrackLayout.AddTrack(1, 2); TrackLayout.AddTrack(1, 3); TrackLayout.AddTrack(1, 4); TrackLayout.AddTrack(1, 5); TrackLayout.AddTrack(2, 2); TrackLayout.AddTrack(2, 3); TrackLayout.AddTrack(2, 4); TrackLayout.AddTrack(3, 3); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 1).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 2).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 3).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 4).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 5).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 2).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 3).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 4).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(3, 3).Direction); }
public void TwoCrosses() { TrackLayout.AddTrack(1, 2); TrackLayout.AddTrack(2, 2); TrackLayout.AddTrack(3, 2); TrackLayout.AddTrack(2, 1); TrackLayout.AddTrack(1, 4); TrackLayout.AddTrack(2, 4); TrackLayout.AddTrack(3, 4); TrackLayout.AddTrack(2, 5); TrackLayout.AddTrack(2, 3); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 1).Direction); Assert.Equal(TrackDirection.Cross, TrackLayout.GetTrackAt(2, 2).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 3).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(1, 2).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(3, 2).Direction); Assert.Equal(TrackDirection.Cross, TrackLayout.GetTrackAt(2, 4).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(1, 4).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(3, 4).Direction); Assert.True(TrackLayout.GetTrackAt(2, 3).Happy); }
public void Vertical() { TrackLayout.AddTrack(1, 1); TrackLayout.AddTrack(1, 2); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 1).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 2).Direction); }
public void Horizontal() { TrackLayout.AddTrack(1, 1); TrackLayout.AddTrack(2, 1); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(1, 1).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(2, 1).Direction); }
public void RightDown() { TrackLayout.AddTrack(2, 1); TrackLayout.AddTrack(1, 1); TrackLayout.AddTrack(1, 2); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(2, 1).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 2).Direction); Assert.Equal(TrackDirection.RightDown, TrackLayout.GetTrackAt(1, 1).Direction); }
public void LeftUp() { TrackLayout.AddTrack(1, 2); TrackLayout.AddTrack(2, 1); TrackLayout.AddTrack(2, 2); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(1, 2).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 1).Direction); Assert.Equal(TrackDirection.LeftUp, TrackLayout.GetTrackAt(2, 2).Direction); }
public void SidewaysHairpin() { TrackLayout.AddTrack(1, 2); TrackLayout.AddTrack(2, 2); TrackLayout.AddTrack(3, 2); TrackLayout.AddTrack(3, 1); TrackLayout.AddTrack(2, 1); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(1, 2).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(2, 2).Direction); Assert.Equal(TrackDirection.LeftUp, TrackLayout.GetTrackAt(3, 2).Direction); Assert.Equal(TrackDirection.LeftDown, TrackLayout.GetTrackAt(3, 1).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(2, 1).Direction); }
public void VerticalHairpin() { TrackLayout.AddTrack(1, 3); TrackLayout.AddTrack(1, 2); TrackLayout.AddTrack(1, 1); TrackLayout.AddTrack(2, 1); TrackLayout.AddTrack(2, 2); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 3).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 2).Direction); Assert.Equal(TrackDirection.RightDown, TrackLayout.GetTrackAt(1, 1).Direction); Assert.Equal(TrackDirection.LeftDown, TrackLayout.GetTrackAt(2, 1).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 2).Direction); }
public void CrossMiddleLast() { TrackLayout.AddTrack(1, 2); TrackLayout.AddTrack(3, 2); TrackLayout.AddTrack(2, 1); TrackLayout.AddTrack(2, 3); TrackLayout.AddTrack(2, 2); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 1).Direction); Assert.Equal(TrackDirection.Cross, TrackLayout.GetTrackAt(2, 2).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 3).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(1, 2).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(3, 2).Direction); }
public void Happiness() { TrackLayout.AddTrack(1, 1); Assert.False(TrackLayout.GetTrackAt(1, 1).Happy); TrackLayout.AddTrack(1, 2); Assert.False(TrackLayout.GetTrackAt(1, 1).Happy); Assert.False(TrackLayout.GetTrackAt(1, 2).Happy); TrackLayout.AddTrack(1, 3); Assert.False(TrackLayout.GetTrackAt(1, 1).Happy); Assert.True(TrackLayout.GetTrackAt(1, 2).Happy); Assert.False(TrackLayout.GetTrackAt(1, 3).Happy); }
public void LeftAngleWithCircleOnTop() { TrackLayout.AddTrack(1, 3); TrackLayout.AddTrack(2, 3); TrackLayout.AddTrack(2, 4); TrackLayout.AddTrack(1, 1); TrackLayout.AddTrack(2, 1); TrackLayout.AddTrack(2, 2); TrackLayout.AddTrack(1, 2); Assert.Equal(TrackDirection.RightUp, TrackLayout.GetTrackAt(1, 3).Direction); Assert.Equal(TrackDirection.LeftDown, TrackLayout.GetTrackAt(2, 3).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 4).Direction); Assert.Equal(TrackDirection.RightDown, TrackLayout.GetTrackAt(1, 1).Direction); Assert.Equal(TrackDirection.LeftDown, TrackLayout.GetTrackAt(2, 1).Direction); Assert.Equal(TrackDirection.LeftUp, TrackLayout.GetTrackAt(2, 2).Direction); Assert.Equal(TrackDirection.RightUpDown, TrackLayout.GetTrackAt(1, 2).Direction); }
public void LeftRightUp_DrawOver() { TrackLayout.AddTrack(1, 3); TrackLayout.AddTrack(2, 3); TrackLayout.AddTrack(3, 3); TrackLayout.AddTrack(2, 2); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(1, 3).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(2, 3).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(3, 3).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(2, 2).Direction); TrackLayout.AddTrack(2, 3); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(1, 3).Direction); Assert.Equal(TrackDirection.LeftRightUp, TrackLayout.GetTrackAt(2, 3).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(3, 3).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 2).Direction); }
public void Two_Verticals() { TrackLayout.AddTrack(1, 1); TrackLayout.AddTrack(1, 2); TrackLayout.AddTrack(1, 3); TrackLayout.AddTrack(1, 4); TrackLayout.AddTrack(2, 2); TrackLayout.AddTrack(2, 3); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 1).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 2).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 3).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 4).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 2).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 3).Direction); }
public void LeftRightDown_DrawOver() { TrackLayout.AddTrack(1, 1); TrackLayout.AddTrack(2, 1); TrackLayout.AddTrack(3, 1); TrackLayout.AddTrack(2, 2); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(1, 1).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(2, 1).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(3, 1).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(2, 2).Direction); TrackLayout.AddTrack(2, 1); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(1, 1).Direction); Assert.Equal(TrackDirection.RightDown_LeftDown, TrackLayout.GetTrackAt(2, 1).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(3, 1).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 2).Direction); }
public void Trident() { TrackLayout.AddTrack(1, 1); TrackLayout.AddTrack(1, 2); TrackLayout.AddTrack(2, 2); TrackLayout.AddTrack(3, 2); TrackLayout.AddTrack(3, 1); TrackLayout.AddTrack(2, 3); TrackLayout.AddTrack(2, 2); TrackLayout.AddTrack(2, 1); Assert.Equal(TrackDirection.RightDown, TrackLayout.GetTrackAt(1, 1).Direction); Assert.Equal(TrackDirection.RightUp, TrackLayout.GetTrackAt(1, 2).Direction); Assert.Equal(TrackDirection.Cross, TrackLayout.GetTrackAt(2, 2).Direction); Assert.Equal(TrackDirection.LeftUp, TrackLayout.GetTrackAt(3, 2).Direction); Assert.Equal(TrackDirection.LeftDown, TrackLayout.GetTrackAt(3, 1).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(2, 3).Direction); Assert.Equal(TrackDirection.LeftRightDown, TrackLayout.GetTrackAt(2, 1).Direction); }
public void FishHook() { TrackLayout.AddTrack(5, 2); TrackLayout.AddTrack(4, 2); TrackLayout.AddTrack(3, 2); TrackLayout.AddTrack(3, 3); TrackLayout.AddTrack(2, 3); TrackLayout.AddTrack(1, 3); TrackLayout.AddTrack(1, 2); TrackLayout.AddTrack(1, 1); TrackLayout.AddTrack(2, 1); TrackLayout.AddTrack(3, 1); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(5, 2).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(4, 2).Direction); Assert.Equal(TrackDirection.RightDown, TrackLayout.GetTrackAt(3, 2).Direction); Assert.Equal(TrackDirection.LeftUp, TrackLayout.GetTrackAt(3, 3).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(2, 3).Direction); Assert.Equal(TrackDirection.RightUp, TrackLayout.GetTrackAt(1, 3).Direction); Assert.Equal(TrackDirection.Vertical, TrackLayout.GetTrackAt(1, 2).Direction); Assert.Equal(TrackDirection.RightDown, TrackLayout.GetTrackAt(1, 1).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(2, 1).Direction); Assert.Equal(TrackDirection.Horizontal, TrackLayout.GetTrackAt(3, 1).Direction); }