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)); }
public string Filename() { return(HostUtil.MapPath(File)); }