Example #1
0
        public int Run()
        {
            if (options.ShouldShowHelp)
            {
                ShowHelpMessage();
                return(0);
            }

            if (!ValidateOptions())
            {
                ShowHelpMessage();
                return(1);
            }

            var bundlePath          = GenerateBundle();
            var schemaBundle        = SchemaBundle.FromJson(File.ReadAllText(bundlePath));
            var store               = new DetailsStore(schemaBundle);
            var workerGenerationJob = new WorkerGenerationJob(options.NativeOutputDirectory, options, fileSystem);
            var singleJob           = new SingleGenerationJob(options.NativeOutputDirectory, store, fileSystem);

            var runner = new JobRunner(fileSystem);

            runner.Run(singleJob, workerGenerationJob);
            return(0);
        }
Example #2
0
        public void OneTimeSetup()
        {
            var bundle = JsonParsingTests.GetBundleContents();

            store = new DetailsStore(SchemaBundle.FromJson(bundle));
        }
Example #3
0
 public void ParsingSchemaBundleV1_does_not_throw()
 {
     Assert.DoesNotThrow(() => SchemaBundle.FromJson(GetBundleContents()));
 }