public void ShouldBeCachedPartial() { CachedPartialConvention.ShouldBeCachedPartial(ActionCall.For <CachedController>(x => x.OneCachedPartial())).ShouldBeTrue(); CachedPartialConvention.ShouldBeCachedPartial(ActionCall.For <CachedController>(x => x.TwoPartial())).ShouldBeFalse(); CachedPartialConvention.ShouldBeCachedPartial(ActionCall.For <CachedController>(x => x.Cached())).ShouldBeFalse(); CachedPartialConvention.ShouldBeCachedPartial(ActionCall.For <CachedController>(x => x.Something())).ShouldBeFalse(); }
public void modify_without_any_prior_caching() { var chain = new BehaviorChain(); CachedPartialConvention.Modify(chain); chain.Last().ShouldBeOfType <OutputCachingNode>() .VaryByPolicies().Single().ShouldEqual(typeof(VaryByResource)); }