Example #1
0
 public void FinalStatisticsCollection()
 {
     XAssert.IsTrue(StatisticsEventListener.ShouldSendStatisticToFinalStatistics("Category.Some_Name_With_Underscores"));
     XAssert.IsTrue(StatisticsEventListener.ShouldSendStatisticToFinalStatistics("FileContentTable.NumContentMismatch"));
     XAssert.IsFalse(StatisticsEventListener.ShouldSendStatisticToFinalStatistics("PipCaching_HistoricWeakFingerprintLoadedCount"));
     XAssert.IsFalse(StatisticsEventListener.ShouldSendStatisticToFinalStatistics("PipCaching_HistoricWeakFingerprintLoaded_Count"));
 }
Example #2
0
 protected override void TestSetup()
 {
     eventListener = new StatisticsEventListener();
     CacheBuilder
     .AddEventListener(eventListener)
     .For <ObjectReturningNull>()
     .CacheMethod(c => c.ReturnNullIfZero(0))
     .As <IObjectReturningNull>();
     factory = CacheBuilder.BuildFactory();
 }
Example #3
0
        protected override void TestSetup()
        {
            eventListener = new StatisticsEventListener();
            CacheBuilder
            .For <ObjectReturningNewGuids>()
            .CacheMethod(c => c.CachedMethod())
            .As <IObjectReturningNewGuids>()
            .AddEventListener(eventListener);

            factory = CacheBuilder.BuildFactory();
        }
Example #4
0
        protected override void TestSetup()
        {
            eventListener = new StatisticsEventListener();
            CacheBuilder
            .AddEventListener(eventListener)
            .For <ObjectWithParametersOnCachedMethod>()
            .CacheMethod(c => c.CachedMethod(null))
            .As <IObjectWithParametersOnCachedMethod>();

            factory   = CacheBuilder.BuildFactory();
            component = factory.Create <IObjectWithParametersOnCachedMethod>();
        }