コード例 #1
0
        public void SetUp()
        {
            _authenticationMock = new DynamicMock(typeof(IAuthentication));
            _authenticationMock.SetupResult("Identifier", "johndoe");
            _sessionMock = new DynamicMock(typeof(ISessionCache));

            _manager          = new SessionSecurityManager();
            _manager.Settings = new IAuthentication[] {
                _authenticationMock.MockInstance as IAuthentication
            };
            _manager.SessionCache = _sessionMock.MockInstance as ISessionCache;
            _manager.Initialise();
        }
コード例 #2
0
        public void SetUp()
        {
            _authenticationMock = new DynamicMock(typeof(IAuthentication));
            _authenticationMock.SetupResult("Identifier", "johndoe");
            _sessionMock = new DynamicMock(typeof(ISessionCache));

            _manager = new SessionSecurityManager();
            _manager.Settings = new IAuthentication[]{
                _authenticationMock.MockInstance as IAuthentication
            };
            _manager.SessionCache = _sessionMock.MockInstance as ISessionCache;
            _manager.Initialise();
        }