<commit_before>using System.Collections.Generic;
using System.Linq;
using CommandLine;
using FluentAssertions;
using Xunit;

namespace Arkivverket.Arkade.CLI.Tests
{
    public class CommandTests
    {
        [Fact]
        public void CommonInputErrorIsHandled()
        {
            var argsWithExpectedError = new List<(string, ErrorType)>
            {
                // BadVerbSelectedError
                ("-a archive", ErrorType.BadVerbSelectedError),
                ("wrong -a archive", ErrorType.BadVerbSelectedError),

                // MissingRequiredOptionError
                ("process -t type -m metadata -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("process -a archive -m metadata -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("process -a archive -t type -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("process -a archive -t type -m metadata -o output-dir", ErrorType.MissingRequiredOptionError),
                ("process -a archive -t type -m metadata -p process-dir", ErrorType.MissingRequiredOptionError),
                ("pack -t type -m metadata -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("pack -a archive -m metadata -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("pack -a archive -t type -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("pack -a archive -t type -m metadata -o output-dir", ErrorType.MissingRequiredOptionError),
                ("pack -a archive -t type -m metadata -p process-dir", ErrorType.MissingRequiredOptionError),
                ("test -t type -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("test -a archive -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("test -a archive -t type -o output-dir", ErrorType.MissingRequiredOptionError),
                ("test -a archive -t type -p process-dir", ErrorType.MissingRequiredOptionError),
                ("generate -m", ErrorType.MissingRequiredOptionError),
                ("generate -l", ErrorType.MissingRequiredOptionError),
                ("analyse -f document-file-dir", ErrorType.MissingRequiredOptionError),
                ("analyse -o output-dir", ErrorType.MissingRequiredOptionError),

                //MissingGroupOptionError
                ("generate -o output-dir", ErrorType.MissingGroupOptionError),

                // MissingValueOptionError
                ("process --archive", ErrorType.MissingValueOptionError),
                ("process --type", ErrorType.MissingValueOptionError),
                ("process --metadata-file", ErrorType.MissingValueOptionError),
                ("process --processing-area", ErrorType.MissingValueOptionError),
                ("process --output-directory", ErrorType.MissingValueOptionError),
                ("process --information-package-type", ErrorType.MissingValueOptionError),
                ("pack --archive", ErrorType.MissingValueOptionError),
                ("pack --type", ErrorType.MissingValueOptionError),
                ("pack --metadata-file", ErrorType.MissingValueOptionError),
                ("pack --processing-area", ErrorType.MissingValueOptionError),
                ("pack --output-directory", ErrorType.MissingValueOptionError),
                ("pack --information-package-type", ErrorType.MissingValueOptionError),
                ("test --archive", ErrorType.MissingValueOptionError),
                ("test --type", ErrorType.MissingValueOptionError),
                ("test --processing-area", ErrorType.MissingValueOptionError),
                ("test --output-directory", ErrorType.MissingValueOptionError),
                ("generate --output-directory", ErrorType.MissingValueOptionError),
                ("analyse --output-directory", ErrorType.MissingValueOptionError),
                ("analyse --format-analysis", ErrorType.MissingValueOptionError),
<commit_msg>Fix UnitTest for commands in CLI<commit_after>using System.Collections.Generic;
using System.Linq;
using CommandLine;
using FluentAssertions;
using Xunit;

namespace Arkivverket.Arkade.CLI.Tests
{
    public class CommandTests
    {
        [Fact]
        public void CommonInputErrorIsHandled()
        {
            var argsWithExpectedError = new List<(string, ErrorType)>
            {
                // BadVerbSelectedError
                ("-a archive", ErrorType.BadVerbSelectedError),
                ("wrong -a archive", ErrorType.BadVerbSelectedError),

                // MissingRequiredOptionError
                ("process -m metadata -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("process -a archive -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("process -a archive -m metadata -o output-dir", ErrorType.MissingRequiredOptionError),
                ("process -a archive -m metadata -p process-dir", ErrorType.MissingRequiredOptionError),
                ("pack -m metadata -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("pack -a archive -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("pack -a archive -m metadata -o output-dir", ErrorType.MissingRequiredOptionError),
                ("pack -a archive -m metadata -p process-dir", ErrorType.MissingRequiredOptionError),
                ("test -p process-dir -o output-dir", ErrorType.MissingRequiredOptionError),
                ("test -a archive -o output-dir", ErrorType.MissingRequiredOptionError),
                ("test -a archive -p process-dir", ErrorType.MissingRequiredOptionError),
                ("generate -m", ErrorType.MissingRequiredOptionError),
                ("generate -l", ErrorType.MissingRequiredOptionError),
                ("analyse -f document-file-dir", ErrorType.MissingRequiredOptionError),
                ("analyse -o output-dir", ErrorType.MissingRequiredOptionError),

                //MissingGroupOptionError
                ("generate -o output-dir", ErrorType.MissingGroupOptionError),

                // MissingValueOptionError
                ("process --archive", ErrorType.MissingValueOptionError),
                ("process --type", ErrorType.MissingValueOptionError),
                ("process --metadata-file", ErrorType.MissingValueOptionError),
                ("process --processing-area", ErrorType.MissingValueOptionError),
                ("process --output-directory", ErrorType.MissingValueOptionError),
                ("process --information-package-type", ErrorType.MissingValueOptionError),
                ("pack --archive", ErrorType.MissingValueOptionError),
                ("pack --type", ErrorType.MissingValueOptionError),
                ("pack --metadata-file", ErrorType.MissingValueOptionError),
                ("pack --processing-area", ErrorType.MissingValueOptionError),
                ("pack --output-directory", ErrorType.MissingValueOptionError),
                ("pack --information-package-type", ErrorType.MissingValueOptionError),
                ("test --archive", ErrorType.MissingValueOptionError),
                ("test --type", ErrorType.MissingValueOptionError),
                ("test --processing-area", ErrorType.MissingValueOptionError),
                ("test --output-directory", ErrorType.MissingValueOptionError),
                ("generate --output-directory", ErrorType.MissingValueOptionError),
                ("analyse --output-directory", ErrorType.MissingValueOptionError),
                ("analyse --format-analysis", ErrorType.MissingValueOptionError),

{'fraction_non_alphanumeric': 0.11038293497815471, 'fraction_numerical': 0.0, 'mean_word_length': 2.400174748798602, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7551075', 'n_tokens_mistral': 1896, 'n_tokens_neox': 1799, 'n_words': 439}