示例#1
0
        private static void RegenerateTestClasses(Options options, string[] args)
        {
            options.Setup(args);

            var canonicalDataFile = new CanonicalDataFile(options);

            canonicalDataFile.DownloadData();

            if (options.ShouldGenerate)
            {
                Log.Information("Re-generating test classes...");
            }

            var canonicalDataParser = new CanonicalDataParser(canonicalDataFile);

            foreach (var exercise in new ExerciseCollection(canonicalDataFile, options))
            {
                RegenerateTestClass(exercise, options, canonicalDataParser);
            }

            if (options.ShouldGenerate)
            {
                Log.Information("Re-generated test classes.");
            }
        }
示例#2
0
        private static void RegenerateTestClasses(Options options)
        {
            options.Normalize();

            var canonicalDataFile = new CanonicalDataFile(options);

            canonicalDataFile.DownloadData();

            Log.Information("Re-generating test classes...");

            var canonicalDataParser = new CanonicalDataParser(canonicalDataFile);

            foreach (var exercise in new ExerciseCollection(canonicalDataFile))
            {
                RegenerateTestClass(exercise, options, canonicalDataParser);
            }

            Log.Information("Re-generated test classes.");
        }