Пример #1
0
        public ProxyShould()
        {
            _products = new Dictionary <int, IProductInfo>
            {
                { 1, Mock.Of <IProductInfo>(
                      productInfo =>
                      productInfo.Name == "Xbox360" &&
                      productInfo.Id == 1) }
            };
            _adminUser   = Mock.Of <IUser> (user => user.IsAdmin == true);
            _regularUser = Mock.Of <IUser> (user => user.IsAdmin == false);

            _createAuthController = (user) => new AuthenticationController(user);
            _entries = new Entries(_products);
        }
Пример #2
0
 public EntriesProxy(IAuthenticationController authCtrl, IEntries realEntries)
 {
     _authCtrl    = authCtrl;
     _realEntries = realEntries;
 }