public FactsBase()
            {
                _validationContext = new Mock <IValidationEntitiesContext>();
                _logger            = new Mock <ILogger <ValidatorStateService> >();

                _validationRequest = new Mock <IValidationRequest>();
                _validationRequest.Setup(x => x.NupkgUrl).Returns(NupkgUrl);
                _validationRequest.Setup(x => x.PackageId).Returns(PackageId);
                _validationRequest.Setup(x => x.PackageKey).Returns(PackageKey);
                _validationRequest.Setup(x => x.PackageVersion).Returns(PackageVersion);
                _validationRequest.Setup(x => x.ValidationId).Returns(ValidationId);

                _target = new ValidatorStateService(_validationContext.Object, typeof(AValidator), _logger.Object);
            }
            public FactsBase()
            {
                _validationContext = new Mock <IValidationEntitiesContext>();
                _logger            = new Mock <ILogger <ValidatorStateService> >();

                _validationRequest = new Mock <IValidationRequest>();
                _validationRequest.Setup(x => x.NupkgUrl).Returns(NupkgUrl);
                _validationRequest.Setup(x => x.PackageId).Returns(PackageId);
                _validationRequest.Setup(x => x.PackageKey).Returns(PackageKey);
                _validationRequest.Setup(x => x.PackageVersion).Returns(PackageVersion);
                _validationRequest.Setup(x => x.ValidationId).Returns(ValidationId);

                _target = CreateValidatorStateService(ValidatorUtility.GetValidatorName(typeof(AValidator)));
            }
Пример #3
0
            public FactsBase(ITestOutputHelper output)
            {
                _output            = output ?? throw new ArgumentNullException(nameof(output));
                _validationContext = new Mock <IValidationEntitiesContext>();
                _logger            = new LoggerFactory().AddXunit(_output).CreateLogger <ValidatorStateService>();

                _validationRequest = new Mock <IValidationRequest>();
                _validationRequest.Setup(x => x.NupkgUrl).Returns(NupkgUrl);
                _validationRequest.Setup(x => x.PackageId).Returns(PackageId);
                _validationRequest.Setup(x => x.PackageKey).Returns(PackageKey);
                _validationRequest.Setup(x => x.PackageVersion).Returns(PackageVersion);
                _validationRequest.Setup(x => x.ValidationId).Returns(ValidationId);

                _target = CreateValidatorStateService(ValidatorUtility.GetValidatorName(typeof(AValidator)));
            }