private void VerifySingleCodeGenerationPass(out CodeGenerationConsoleManager manager
                                                    , out OrToolsSatGeneratedSyntaxTreeRegistry registry)
        {
            // TODO: TBD: for a single pass, it might make sense to refactor this block of code... rinse and repeat for other scenarios...
            VerifyManager((m, a) => ConfigureDefaultArguments(a), DefaultErrorLevel, out manager, out registry);

            var local = registry;

            Path.Combine(registry.OutputDirectory, RegistryFileName).AssertFileExists();

            void VerifyGeneratedFileExists(Guid key) => Path.Combine(local.OutputDirectory, key.RenderGeneratedFileName()).AssertFileExists();

            registry.AssertNotNull().AssertNotEmpty().SelectMany(x => x.GeneratedAssetKeys)
            .ToList().ForEach(VerifyGeneratedFileExists);
        }
        private static void VerifyDifferentRegistries(OrToolsSatGeneratedSyntaxTreeRegistry previousRegistry
                                                      , OrToolsSatGeneratedSyntaxTreeRegistry currentRegistry)
        {
            {
                bool DirectoryExists(OrToolsSatGeneratedSyntaxTreeRegistry x) => Directory.Exists(x.OutputDirectory);

                // Do some quick verification of each Registry.
                previousRegistry = previousRegistry.AssertNotNull().AssertNotEmpty().AssertTrue(DirectoryExists);
                currentRegistry  = currentRegistry.AssertNotNull().AssertNotEmpty().AssertTrue(DirectoryExists);
            }

            // Should always Not be the Same.
            previousRegistry.AssertNotSame(currentRegistry);

            var previousKeys = previousRegistry.SelectMany(x => x.GeneratedAssetKeys).AssertNotEmpty().ToList().AssertTrue(x => x.Any());
            var currentKeys  = currentRegistry.SelectMany(x => x.GeneratedAssetKeys).AssertNotEmpty().ToList().AssertTrue(x => x.Any());

            {
                // None of the Second Registry Generated Keys should exist in the First Registry.
                void KeysDoesNotContain(IEnumerable <Guid> collection, Guid y) => collection.AssertDoesNotContain(x => x == y);

                // The two sets of Generated Code ought not to overlap whatsoever.
                currentKeys.ForEach(x => KeysDoesNotContain(previousKeys, x));
                previousKeys.ForEach(x => KeysDoesNotContain(currentKeys, x));
            }

            {
                // Newly Generated Code will exist, should also be able to verify this.
                void FileExists(string path) => path.AssertFileExists();

                currentKeys.Select(x => Path.Combine(currentRegistry.OutputDirectory, x.RenderGeneratedFileName())).ToList().ForEach(FileExists);
            }

            {
                // Previously Generated Code will have been Purged, should be able to verify this.
                void FileDoesNotExist(string path) => path.AssertFileDoesNotExist();

                previousKeys.Select(x => Path.Combine(previousRegistry.OutputDirectory, x.RenderGeneratedFileName())).ToList().ForEach(FileDoesNotExist);
            }
        }
        internal void VerifyManager(ConfigureManagerCallback configure, int expectedErrorLevel
                                    , out CodeGenerationConsoleManager manager, out OrToolsSatGeneratedSyntaxTreeRegistry registry)
        {
            manager = Manager.AssertNotNull();

            configure.AssertNotNull().Invoke(manager, Arguments);

            manager.TryParseOrShowHelp(Arguments.ToArray()).AssertTrue();

            manager.Run(out var actualErrorLevel);

            // Whatever the outcome was, obtain that Registry.
            registry = manager.Registry;

            actualErrorLevel.AssertEqual(expectedErrorLevel);

            // ReSharper disable once SwitchStatementMissingSomeCases
            switch (expectedErrorLevel)
            {
            case DefaultErrorLevel:
                registry.AssertNotNull().AssertNotEmpty();
                break;

            case ErrorGeneratingCode:
                // TODO: TBD: may elaborate on what this means, 'error' ...
                break;

            case MustSpecifyOutputDirectory:
                manager.OutputDirectoryVar.Value.AssertTrue(IsNullOrEmpty);
                registry.AssertNull();
                break;

            case MustSpecifyRegistryFileName:
                manager.OutputDirectoryVar.Value.AssertNotNull().AssertNotEmpty();
                manager.GeneratedCodeRegistryFileVar.Value.AssertTrue(IsNullOrEmpty);
                registry.AssertNull();
                break;
            }
        }