public void It_Can_Cache_Templates() { var stubble = new StubbleRenderer(); stubble.CacheTemplate("Test {{Foo}} Test 1"); Assert.Equal(1, stubble.Writer.Cache.Count); stubble.CacheTemplate("Test {{Foo}} Test 2", "{{ }}"); Assert.Equal(2, stubble.Writer.Cache.Count); stubble.CacheTemplate("Test {{Foo}} Test 3", new Tags("{{", "}}")); Assert.Equal(3, stubble.Writer.Cache.Count); }
public void It_Can_Clear_The_Cache() { var stubble = new StubbleRenderer(); stubble.CacheTemplate("Test {{Foo}} Test"); Assert.Equal(1, stubble.Writer.Cache.Count); stubble.ClearCache(); Assert.Equal(0, stubble.Writer.Cache.Count); }