Exemplo n.º 1
0
            protected PackageHasSignatureValidator CreateTarget(bool requireRepositorySignature = true)
            {
                var endpoint = ValidatorTestUtility.CreateCatalogEndpoint();
                var config   = ValidatorTestUtility.CreateValidatorConfig(requireRepositorySignature: requireRepositorySignature);

                return(new PackageHasSignatureValidator(endpoint, config, _logger.Object));
            }
            protected PackageIsRepositorySignedValidator CreateTarget(bool requireRepositorySignature = true)
            {
                var endpoint = ValidatorTestUtility.CreateFlatContainerEndpoint();
                var logger   = Mock.Of <ILogger <PackageIsRepositorySignedValidator> >();
                var config   = ValidatorTestUtility.CreateValidatorConfig(requireRepositorySignature: requireRepositorySignature);

                return(new PackageIsRepositorySignedValidator(endpoint, config, logger));
            }
Exemplo n.º 3
0
            protected SearchHasVersionValidator CreateTarget()
            {
                var endpoint = ValidatorTestUtility.CreateSearchEndpoint();
                var logger   = Mock.Of <ILogger <SearchHasVersionValidator> >();
                var config   = ValidatorTestUtility.CreateValidatorConfig();

                return(new SearchHasVersionValidator(endpoint, config, logger));
            }
        private static CatalogAggregateValidator CreateValidator(
            ValidationContext context,
            bool requirePackageSignature)
        {
            var config           = ValidatorTestUtility.CreateValidatorConfig(requirePackageSignature: requirePackageSignature);
            var loggerFactory    = CreateLoggerFactory();
            var validatorFactory = new ValidatorFactory(config, loggerFactory);

            return(new CatalogAggregateValidator(validatorFactory, config));
        }