Esempio n. 1
0
        private static IResource CreateResource(DateTime lastModified)
        {
            StubResource resource = new StubResource(String.Empty);
            resource.LastModified = lastModified;

            return resource;
        }
Esempio n. 2
0
        public void SetupContext()
        {
            _httpItems = new Hashtable();
            _httpContext = new Mock<HttpContextBase>();
            _httpContext.SetupGet(c => c.Items).Returns(_httpItems);

            _cache = new HttpDependencyCache(() => _httpContext.Object);

            _resource = StubResource.WithPath("~/scripts/myscript.js");
            _resource.LastModified = DateTime.Now.AddDays(-1);
            _dependencies = new string[] { "~/scripts/jquery.js", "~/scripts/site.js" };
            _cache.StoreDependencies(_resource, _dependencies);
        }
Esempio n. 3
0
 public StubResourceBuilder(string virtualPath, StubDependencyProvider dependencyProvider)
 {
     _dependencyProvider = dependencyProvider;
     _resource = StubResource.WithPath(virtualPath);
 }
Esempio n. 4
0
 public void AddResource(string virtualPath, string content)
 {
     StubResource resource = new StubResource(content);
     resource.VirtualPath = virtualPath;
     _resources.Add(resource);
 }
        private static IResource CreateResource(string content, DateTime lastModified)
        {
            StubResource resource1 = new StubResource(content);
            resource1.LastModified = lastModified;
            resource1.VirtualPath = "~/" + content + ".js";

            return resource1;
        }