public void TestBrokenTravel()
        {
            TravelSolution ts = new TravelSolution(shuffleList(prepareBrokenTravel()));

            ts.Solve();
            Assert.IsNull(ts.Result);
        }
        public void TestCircleTravel()
        {
            TravelSolution ts = new TravelSolution(shuffleList(prepareCircleTestItems()));

            ts.Solve();
            Assert.IsNotNull(ts.Result);
        }
        public void TestComplicated2Travel()
        {
            TravelSolution ts = new TravelSolution(shuffleList(prepareComplicated2Travel()));

            ts.Solve();
            Assert.IsNotNull(ts.Result);
            Assert.AreEqual(ts.Result.StartPoint, "a");
            Assert.AreEqual(ts.Result.EndPoint, "e");
        }
        public void TestCircleToCircleTravel()
        {
            TravelSolution ts = new TravelSolution(shuffleList(prepareCircleToCircleTestItems()));

            ts.Solve();
            Assert.IsNotNull(ts.Result);
            Assert.AreEqual(ts.Result.StartPoint, "a");
            Assert.AreEqual(ts.Result.EndPoint, "a");
        }
        public void TestOnePointThreeTimesCrossNoExitTravel()
        {
            TravelSolution ts = new TravelSolution(shuffleList(prepareOnePointThreeTimesCrossNoExitTestItems()));

            ts.Solve();
            Assert.IsNotNull(ts.Result);
            Assert.AreEqual(ts.Result.StartPoint, "a");
            Assert.AreEqual(ts.Result.EndPoint, "d");
        }
        public void TestComplicatedTravel()
        {
            var            data = shuffleList(prepareComplicated1Travel());
            TravelSolution ts   = new TravelSolution(new List <TravelCard>(data));

            ts.Solve();
            Assert.IsNotNull(ts.Result);
            Assert.AreEqual(ts.Result.StartPoint, "a");
            Assert.AreEqual(ts.Result.EndPoint, "h");
        }
        public void TestComplicatedTravel_Case2()
        {
            // special case with previous implementation error
            TravelSolution ts = new TravelSolution(prepareComplicated1Travel_Case2());

            ts.Solve();
            Assert.IsNotNull(ts.Result);
            Assert.AreEqual(ts.Result.StartPoint, "a");
            Assert.AreEqual(ts.Result.EndPoint, "h");
        }