Esempio n. 1
0
 public void TestSetup()
 {
     _mocks        = new MockRepository();
     _mockSettings = _mocks.StrictMock <IIncludeHandlingSettings>();
     _mockCombiner = _mocks.StrictMock <IIncludeCombiner>();
     _controller   = new IncludeController(_mockSettings, _mockCombiner);
     _mocks.ReplayAll();
 }
 public void TestSetup()
 {
     _mocks = new MockRepository();
     _mockSettings = _mocks.StrictMock<IIncludeHandlingSettings>();
     _mockCombiner = _mocks.StrictMock<IIncludeCombiner>();
     _controller = new IncludeController(_mockSettings, _mockCombiner);
     _mocks.ReplayAll();
 }
 public IncludeCombinerInteractionFacts()
 {
     _mocks = new MockRepository();
     _mockSettings = _mocks.StrictMock<IIncludeHandlingSettings>();
     _mockReader = _mocks.StrictMock<IIncludeReader>();
     _mockStorage = _mocks.StrictMock<IIncludeStorage>();
     _mockHttp = _mocks.StrictMock<IHttpContextProvider>();
     _combiner = new IncludeCombiner(_mockSettings, _mockReader, _mockStorage, _mockHttp);
     _mocks.ReplayAll();
 }
Esempio n. 4
0
 public void TestSetup()
 {
     _mocks        = new MockRepository();
     _mockSettings = _mocks.DynamicMock <IIncludeHandlingSettings>();
     _mockReader   = _mocks.DynamicMock <IIncludeReader>();
     _mockStorage  = _mocks.DynamicMock <IIncludeStorage>();
     _mockHttp     = _mocks.DynamicMock <IHttpContextProvider>();
     _combiner     = new IncludeCombiner(_mockSettings, _mockReader, _mockStorage, _mockHttp);
     _mocks.ReplayAll();
 }
 public void TestSetup()
 {
     _mocks = new MockRepository();
     _mockHttpContext = _mocks.StrictMock<HttpContextBase>();
     _mockController = _mocks.StrictMock<ControllerBase>();
     _mockResponse = _mocks.StrictMock<HttpResponseBase>();
     _mockRequest = _mocks.StrictMock<HttpRequestBase>();
     _mockCachePolicy = _mocks.StrictMock<HttpCachePolicyBase>();
     _controllerContext = new ControllerContext(_mockHttpContext, new RouteData(), _mockController);
     _stubCombiner = _mocks.Stub<IIncludeCombiner>();
     _mocks.ReplayAll();
     _cssCombination = new IncludeCombination(IncludeType.Css, new[] { "foo.css" }, "#foo{color:red}", DateTime.UtcNow, new CssTypeElement());
 }
Esempio n. 6
0
 public void TestSetup()
 {
     _mocks             = new MockRepository();
     _mockHttpContext   = _mocks.StrictMock <HttpContextBase>();
     _mockController    = _mocks.StrictMock <ControllerBase>();
     _mockResponse      = _mocks.StrictMock <HttpResponseBase>();
     _mockRequest       = _mocks.StrictMock <HttpRequestBase>();
     _mockCachePolicy   = _mocks.StrictMock <HttpCachePolicyBase>();
     _controllerContext = new ControllerContext(_mockHttpContext, new RouteData(), _mockController);
     _stubCombiner      = _mocks.Stub <IIncludeCombiner>();
     _mocks.ReplayAll();
     _cssCombination = new IncludeCombination(IncludeType.Css, new[] { "foo.css" }, "#foo{color:red}", DateTime.UtcNow, new CssTypeElement());
 }
 public IncludeCombinationResult(IIncludeCombiner combiner, string key, DateTime now, IIncludeHandlingSettings settings)
     : this(combiner, key, now)
 {
     var typeSettings = settings.Types[Combination.Type];
     _cacheFor = typeSettings.CacheFor;
     if (typeSettings.Compress)
     {
         _preferredCompressionOrder = typeSettings.CompressionOrder;
     }
     else
     {
         _preferredCompressionOrder = new List<ResponseCompression> { ResponseCompression.None };
     }
 }
 public IncludeCombinationResult(IIncludeCombiner combiner, string key, DateTime now)
 {
     if (combiner == null)
     {
         throw new ArgumentNullException("combiner");
     }
     if (string.IsNullOrEmpty(key))
     {
         throw new ArgumentException("key");
     }
     _key = key;
     _now = now;
     Combination = combiner.GetCombination(_key);
 }
Esempio n. 9
0
 public IncludeCombinationResult(IIncludeCombiner combiner, string key, DateTime now)
 {
     if (combiner == null)
     {
         throw new ArgumentNullException("combiner");
     }
     if (string.IsNullOrEmpty(key))
     {
         throw new ArgumentException("key");
     }
     _key        = key;
     _now        = now;
     Combination = combiner.GetCombination(_key);
 }
Esempio n. 10
0
        public IncludeCombinationResult(IIncludeCombiner combiner, string key, DateTime now, IIncludeHandlingSettings settings)
            : this(combiner, key, now)
        {
            var typeSettings = settings.Types[Combination.Type];

            _cacheFor = typeSettings.CacheFor;
            if (typeSettings.Compress)
            {
                _preferredCompressionOrder = typeSettings.CompressionOrder;
            }
            else
            {
                _preferredCompressionOrder = new List <ResponseCompression> {
                    ResponseCompression.None
                };
            }
        }
Esempio n. 11
0
 public void TestSetup()
 {
     _mocks = new MockRepository();
     _mockSettings = _mocks.DynamicMock<IIncludeHandlingSettings>();
     _mockReader = _mocks.DynamicMock<IIncludeReader>();
     _mockStorage = _mocks.DynamicMock<IIncludeStorage>();
     _mockHttp = _mocks.DynamicMock<IHttpContextProvider>();
     _combiner = new IncludeCombiner(_mockSettings, _mockReader, _mockStorage, _mockHttp);
     _mocks.ReplayAll();
 }
 public IncludeController(IIncludeHandlingSettings settings, IIncludeCombiner combiner)
 {
     _settings = settings;
     _combiner = combiner;
 }
Esempio n. 13
0
 public IncludeController(IIncludeHandlingSettings settings, IIncludeCombiner combiner)
 {
     _settings = settings;
     _combiner = combiner;
 }