public void CanHandleEvent()
        {
            // refreshers.HandleEvents wants a UmbracoContext
            // which wants an HttpContext, which we build using a SimpleWorkerRequest
            // which requires these to be non-null
            var domain = Thread.GetDomain();

            if (domain.GetData(".appPath") == null)
            {
                domain.SetData(".appPath", "");
            }
            if (domain.GetData(".appVPath") == null)
            {
                domain.SetData(".appVPath", "");
            }

            // create some event definitions
            var definitions = new IEventDefinition[]
            {
                // works because that event definition maps to an empty handler
                new EventDefinition <IContentTypeService, SaveEventArgs <IContentType> >(null, Current.Services.ContentTypeService, new SaveEventArgs <IContentType>(Enumerable.Empty <IContentType>()), "Saved"),
            };

            // just assert it does not throw
            var refreshers = new DistributedCacheBinder(null, null);

            refreshers.HandleEvents(definitions);
        }
        public void CanHandleEvent()
        {
            // refreshers.HandleEvents wants a UmbracoContext
            // which wants an HttpContext, which we build using a SimpleWorkerRequest
            // which requires these to be non-null
            var domain = Thread.GetDomain();

            if (domain.GetData(".appPath") == null)
            {
                domain.SetData(".appPath", "");
            }
            if (domain.GetData(".appVPath") == null)
            {
                domain.SetData(".appVPath", "");
            }

            // create some event definitions
            var definitions = new IEventDefinition[]
            {
                // works because that event definition maps to an empty handler
                new EventDefinition <IContentTypeService, SaveEventArgs <IContentType> >(null, Current.Services.ContentTypeService, new SaveEventArgs <IContentType>(Enumerable.Empty <IContentType>()), "Saved"),
            };

            var umbracoContextFactory = new UmbracoContextFactory(
                new TestUmbracoContextAccessor(),
                Mock.Of <IPublishedSnapshotService>(),
                new TestVariationContextAccessor(),
                new TestDefaultCultureAccessor(),
                TestObjects.GetUmbracoSettings(),
                TestObjects.GetGlobalSettings(),
                new UrlProviderCollection(Enumerable.Empty <IUrlProvider>()),
                new MediaUrlProviderCollection(Enumerable.Empty <IMediaUrlProvider>()),
                Mock.Of <IUserService>());

            // just assert it does not throw
            var refreshers = new DistributedCacheBinder(null, umbracoContextFactory, null);

            refreshers.HandleEvents(definitions);
        }