internal TException VerifyManagerThrows <TException>(ConfigureManagerCallback configure)
            where TException : Exception
        {
            var manager = Manager;

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

            Action run = () =>
            {
                manager.TryParseOrShowHelp(Arguments.ToArray()).AssertTrue();
                manager.Run(out _);
            };

            return(run.AssertThrows <TException>());
        }
        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;
            }
        }