Ejemplo n.º 1
0
        public void Manifest_UpdatesWhenFileChanged()
        {
            ResponseUtil.SetContentTypeCacheManifest = () => {};
            RequestUtil.GetRootUrl = () => "test/testing";

            var controller = new OfflineController();

            var result        = controller.Manifest();
            var firstModified = ((Manifest)result.Model).LastModified;

            var onlineFile = HostUtil.MapPath("~/favicon.ico");

            File.SetLastWriteTimeUtc(onlineFile, DateTime.UtcNow);

            result = controller.Manifest();
            var newlyModified = ((Manifest)result.Model).LastModified;

            Assert.That(newlyModified, Is.GreaterThanOrEqualTo(firstModified));
        }
Ejemplo n.º 2
0
 public string Filename()
 {
     return(HostUtil.MapPath(File));
 }