static void Main(string[] args) { (var num, var data) = SalesmanCalculator2.LoadData("tsp2_data.txt"); Console.WriteLine("Data loaded"); var distance = SalesmanCalculator2.ShortestCircuit(num, data); Console.WriteLine(distance); }
public void CorrectCircuitLength(string inputFile, string outputFile) { (var num, var data) = SalesmanCalculator2.LoadData(inputFile); var distance = SalesmanCalculator2.ShortestCircuit(num, data); var output = File.ReadAllLines(outputFile).WhereNotNull().Select(int.Parse).First(); Assert.AreEqual(output, distance); }