public TheFindBestVersionMatchMethod(ITestOutputHelper output) : base(output)
 {
     Input = new FindBestVersionMatchInput
     {
         VersionRange = "(, )",
         Versions     = string.Join(Environment.NewLine, new List <string>
         {
             "4.2.0-beta",
             "4.2.0",
             "4.3.0-beta",
             "4.3.0",
             "4.3.1-beta",
             "4.3.1",
             "4.4.0-beta",
             "4.4.0",
             "4.9.0-beta",
             "4.9.0",
             "5.0.0-beta",
             "5.0.0",
             "5.0.1-beta",
             "5.0.1",
         }),
     };
 }
        public FindBestVersionMatchOutput FindBestVersionMatch(FindBestVersionMatchInput input)
        {
            var output = new FindBestVersionMatchOutput
            {
                InputStatus = InputStatus.Missing,
                Input       = input,
            };

            if (input == null)
            {
                return(output);
            }

            var validatedVersionRange = InputValidator.VersionRange(input.VersionRange);
            var validatedVersions     = InputValidator.Versions(input.Versions);

            if (validatedVersionRange.IsMissing || validatedVersions.IsMissing)
            {
                return(output);
            }

            if (validatedVersionRange.IsInvalid || validatedVersions.IsInvalid)
            {
                output.InputStatus = InputStatus.Invalid;
                return(output);
            }

            output.InputStatus = InputStatus.Valid;
            output.Result      = GetBestVersionMatch(
                validatedVersionRange.Data,
                validatedVersions.Data,
                listed: null,
                showUnlisted: true);

            return(output);
        }