public void GetOutputWebPath_NoHash() { var renderToPath = Guid.NewGuid().ToString(); var strategy = new DefaultCacheInvalidationStrategy(); Assert.AreEqual(renderToPath, strategy.GetOutputWebPath(renderToPath, null, null)); }
public void GetOutputWebPath_HashInFilename() { var renderToPath = Guid.NewGuid().ToString() + "_#"; var hash = Guid.NewGuid().ToString(); var strategy = new DefaultCacheInvalidationStrategy(); Assert.AreEqual(renderToPath.Replace("#", hash), strategy.GetOutputWebPath(renderToPath, null, hash)); }
public void GetOutputWebPath_Querystring() { var renderToPath = Guid.NewGuid().ToString() + "?something=somethingelse"; var hashKeyName = Guid.NewGuid().ToString(); var hash = Guid.NewGuid().ToString(); var strategy = new DefaultCacheInvalidationStrategy(); Assert.AreEqual(renderToPath + "&" + hashKeyName + "=" + hash, strategy.GetOutputWebPath(renderToPath, hashKeyName, hash)); }