public void Serrializer_Returns_Output()
        {
            var serr = new OutputDataSerializer();

            var output = serr.GetSerializedOutput(new OutputData());

            Assert.IsNotNull(output);
        }
Example #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)));
        }