public void TestInitialize() { directory = new ActiveDirectory(); cache = new AuthorizationInformationMemoryCache(); logger = Global.LogFactory.CreateLogger <AuthorizationInformationBuilder>(); powershell = Mock.Of <IPowerShellSecurityDescriptorGenerator>(); targetDataProvider = new TargetDataProvider(new TargetDataCache(), Global.LogFactory.CreateLogger <TargetDataProvider>()); authorizationContextProvider = new AuthorizationContextProvider(Mock.Of <IOptions <AuthorizationOptions> >(), directory, Global.LogFactory.CreateLogger <AuthorizationContextProvider>()); }
public AuthorizationInformationBuilder(IOptionsSnapshot <AuthorizationOptions> options, IDirectory directory, ILogger <AuthorizationInformationBuilder> logger, IPowerShellSecurityDescriptorGenerator powershell, IAuthorizationInformationMemoryCache authzCache, ITargetDataProvider targetDataProvider, IAuthorizationContextProvider authorizationContextProvider) { this.directory = directory; this.logger = logger; this.options = options.Value; this.powershell = powershell; this.authzCache = authzCache; this.targetDataProvider = targetDataProvider; this.authorizationContextProvider = authorizationContextProvider; }
public AuthorizationInformationBuilder(IOptionsSnapshot <AuthorizationOptions> options, ILogger <AuthorizationInformationBuilder> logger, IPowerShellSecurityDescriptorGenerator powershell, IAuthorizationInformationMemoryCache authzCache, IComputerTargetProvider computerTargetProvider, IAuthorizationContextProvider authorizationContextProvider, IAmsLicenseManager licenseManager) { this.logger = logger; this.options = options.Value; this.powershell = powershell; this.authzCache = authzCache; this.computerTargetProvider = computerTargetProvider; this.authorizationContextProvider = authorizationContextProvider; this.licenseManager = licenseManager; }
public void TestInitialize() { this.discoveryServices = new DiscoveryServices(Mock.Of <ILogger <DiscoveryServices> >()); directory = new ActiveDirectory(discoveryServices); cache = new AuthorizationInformationMemoryCache(); logger = Global.LogFactory.CreateLogger <AuthorizationInformationBuilder>(); powershell = Mock.Of <IPowerShellSecurityDescriptorGenerator>(); var mockLicenseManager = new Mock <IAmsLicenseManager>(); mockLicenseManager.Setup(l => l.IsEnterpriseEdition()).Returns(true); mockLicenseManager.Setup(l => l.IsFeatureCoveredByFullLicense(It.IsAny <LicensedFeatures>())).Returns(true); mockLicenseManager.Setup(l => l.IsFeatureEnabled(It.IsAny <LicensedFeatures>())).Returns(true); this.licenseManager = mockLicenseManager.Object; targetDataProvider = new ComputerTargetProvider(directory, new TargetDataProvider(new TargetDataCache(), Global.LogFactory.CreateLogger <TargetDataProvider>()), Global.LogFactory.CreateLogger <ComputerTargetProvider>()); authorizationContextProvider = new AuthorizationContextProvider(Mock.Of <IOptions <AuthorizationOptions> >(), Global.LogFactory.CreateLogger <AuthorizationContextProvider>(), discoveryServices); }