public void SetUp()
 {
     _contentRepository = new CmsContentRepositoryFake();
     _contentSourceRegistration = new ContentSourceRegistration(() => _contentRepository, null);
     _contentService = new ContentService(_contentSourceRegistration);
     _builder = new ConfigurationBuilder(_contentService);
 }
        public ConfigurationBuilder(ContentService contentService)
        {
            if (contentService == null)
            {
                throw new ArgumentNullException("contentService", "Configuration builder requires a content service to configure.");
            }

            ContentService = contentService;
        }
        public static ConfigurationBuilder ConfigureWithContentSource(Func<ICmsContentRepository> contentRepository, int? refreshInterval = null)
        {
            if (contentRepository == null)
            {
                throw new ArgumentNullException("contentRepository", "CMS requires a content source to function");
            }

            var contentRegistration = new ContentSourceRegistration(contentRepository, refreshInterval);
            ContentService = new ContentService(contentRegistration);

            HtmlHelperExtensionsForReallyTinyCms.ContentService = ContentService;

            return new ConfigurationBuilder(ContentService);
        }
 public void SetUp()
 {
     _contentRepository = new CmsContentRepositoryFake();
     _contentRepositoryFunction = () => _contentRepository;
     _contentRegistration = new ContentSourceRegistration(_contentRepositoryFunction, null);
     _contentService = new ContentService(_contentRegistration);
 }