コード例 #1
0
        public void SetUp()
        {
            _securityAdapter = new WebSecurityAdapter();

            _testHelper = new WebPermissionProviderTestHelper();
            var serviceLocator = DefaultServiceLocator.Create();

            serviceLocator.RegisterMultiple <IWebSecurityAdapter>();
            serviceLocator.RegisterMultiple <IWxeSecurityAdapter> (() => _testHelper.WxeSecurityAdapter);
            _serviceLocatorScope = new ServiceLocatorScope(serviceLocator);
        }
コード例 #2
0
        public void SetUp()
        {
            _securityAdapter = new WebSecurityAdapter();

            _testHelper = new WebPermissionProviderTestHelper();

            var serviceLocator = DefaultServiceLocator.Create();

            serviceLocator.RegisterSingle(() => _testHelper.SecurityProvider);
            serviceLocator.RegisterSingle(() => _testHelper.PrincipalProvider);
            serviceLocator.RegisterSingle(() => _testHelper.FunctionalSecurityStrategy);
            _serviceLocatorScope = new ServiceLocatorScope(serviceLocator);
        }