예제 #1
0
 public void Test_Standard_AddHookObject()
 {
     hookRepository.Add(new LogHook());
     Assert.AreEqual(1, hookRepository.Hooks.Length);
 }
예제 #2
0
 public void MyTestInitialize()
 {
     hookRepository = HookHelper.GetRepository <IHook>();
     hookRepository.Add(new IHook[] { new LogHook(), new DiagnosticsHook() });
 }
예제 #3
0
 public void MyTestInitialize()
 {
     hookRepository = HookHelper.GetRepository <IHook>(true);
     hookRepository.Add(typeof(LogHook));
     hookRepository.Add(typeof(DiagnosticsHook));
 }
예제 #4
0
        public void Test_Lazy_RemoveHooks()
        {
            hookRepository.RemoveAll();
            hookRepository.Add(new IHook[] { new LogHook(), new DiagnosticsHook() });
            int invokedHooks = hookRepository.InvokeAll();

            Assert.AreEqual(0, invokedHooks);
        }