Example #1
0
        public void Wire_with_three_turns()
        {
            var routePlanner = new Plotter();
            var route        = routePlanner.CreateRoute("R1,D1,L1,U1").ToArray();

            CollectionAssert.AreEqual(new[] { Coords.From(0, 0), Coords.From(1, 0), Coords.From(1, 1), Coords.From(0, 1), Coords.From(0, 0) }, route);
        }
Example #2
0
        public void Straight_wire()
        {
            var routePlanner = new Plotter();
            var route        = routePlanner.CreateRoute("R2").ToArray();

            CollectionAssert.AreEqual(new[] { Coords.From(0, 0), Coords.From(1, 0), Coords.From(2, 0) }, route);
        }