Ejemplo n.º 1
0
        public void TeskSolver_Returns_Output_Data()
        {
            var solver = new TaskSolver();

            var result = solver.GetOutputData(new InputData());

            Assert.IsNotNull(result);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            var inputDataPath = ConfigurationManager.AppSettings[InputDataPathKey];
            var outputDataPath = ConfigurationManager.AppSettings[OutputDataPathKey];

            var input = File.ReadAllText(inputDataPath);
            var inputData = new InputDataParser().GetParsedModel(input);

            var taskSolver = new TaskSolver();
            var outputData = taskSolver.GetOutputData(inputData);
            var output = new OutputDataSerializer().GetSerializedOutput(outputData);

            // Makes input data from output to check is it the same
            //var output = new OutputDataSerializer().GetSerrializedInput(inputData, outputData);

            File.WriteAllText(outputDataPath, output);

            Console.Write(output);

            Console.WriteLine();
            Console.WriteLine(string.Format("Score: {0}", taskSolver.GetScore(inputData, outputData)));
        }