Ejemplo n.º 1
0
 public void InvocationContextGetsHookPointsCorrectly()
 {
     var hook = new HookA();
     var configuration = new ApiConfiguration().AddHookHandler<IHookA>(hook);
     configuration.EnsureCommitted();
     var apiContext = new ApiContext(configuration);
     var context = new InvocationContext(apiContext);
     Assert.Same(hook, context.GetHookHandler<IHookA>());
 }
        public void InvocationContextGetsHookPointsCorrectly()
        {
            var hook          = new HookA();
            var configuration = new ApiConfiguration().AddHookHandler <IHookA>(hook);

            configuration.EnsureCommitted();
            var apiContext = new ApiContext(configuration);
            var context    = new InvocationContext(apiContext);

            Assert.Same(hook, context.GetHookHandler <IHookA>());
        }