コード例 #1
0
        public CachedFileRequestHandler_ProcessRequestTests()
        {
            cacheDirectory = new FakeFileSystem();

            response     = new Mock <HttpResponseBase>();
            outputStream = new MemoryStream();
            response.SetupGet(r => r.OutputStream).Returns(outputStream);
            cache = new Mock <HttpCachePolicyBase>();
            response.SetupGet(r => r.Cache).Returns(cache.Object);

            handler = new CachedFileRequestHandler(response.Object, cacheDirectory);
        }
コード例 #2
0
        public CachedFileRequestHandler_ProcessRequestTests()
        {
            cacheDirectory = new FakeFileSystem();

            response = new Mock<HttpResponseBase>();
            outputStream = new MemoryStream();
            response.SetupGet(r => r.OutputStream).Returns(outputStream);
            cache = new Mock<HttpCachePolicyBase>();
            response.SetupGet(r => r.Cache).Returns(cache.Object);

            handler = new CachedFileRequestHandler(response.Object, cacheDirectory);
        }