Esempio n. 1
0
 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);
 }
Esempio n. 2
0
        public override TimeSpan RunTest(int iterations)
        {
            var stopwatch = Stopwatch.StartNew();
            var stubble = new StubbleRenderer();

            for (var i = 0; i < iterations; i++)
            {
                var testCase = GetRenderTestCase(i);
                stubble.Render(testCase.Key, testCase.Value);
                stubble.ClearCache();
            }
            stopwatch.Stop();

            return stopwatch.Elapsed;
        }