public AccountController(IDbConnection db, IMetricTracker metrics, ICacheClient cache, IMailController mailController, IUserService userService, IUserAuthenticationService authenticationService)
     : base(db, metrics, cache)
 {
     _mailController = mailController;
     _userService = userService;
     _authenticationService = authenticationService;
 }
        public void Init()
        {
            _list     = new List <Tweet>();
            _emojis   = new List <Emoji>();
            _url      = new List <Url>();
            _hashtags = new List <Hashtag>();

            _metricSource = new Mock <IMetricSource>();
            _repository   = new Mock <IRepository>();
            _settings     = new Mock <IOptions <MetricsSettings> >();

            _settings.Setup(x => x.Value).Returns(new MetricsSettings
            {
                EmojiFile    = "c:\\Test\\emojiFile.json",
                PhotoDomains = "pic.twitter.com,instagram"
            });

            totalTweetsMetric     = new TotalTweetsMetric(_metricSource.Object);
            tweetsPerSecondMetric = new TweetsPerSecondMetric(_metricSource.Object);
            tweetsPerMinuteMetric = new TweetsPerMinuteMetric(_metricSource.Object);
            tweetsPerHourMetric   = new TweetsPerHourMetric(_metricSource.Object);
            emojiPercentageMetric = new EmojiPercentageMetric(_metricSource.Object);
            photoPercentageMetric = new PhotoPercentageMetric(_metricSource.Object, _settings.Object);
            urlsPercentageMetric  = new UrlsPercentageMetric(_metricSource.Object);
            topDomainMetric       = new TopDomainMetric(_metricSource.Object);
            topEmojiMetric        = new TopEmojiMetric(_metricSource.Object);
            topHashtagMetric      = new TopHashtagMetric(_metricSource.Object);
        }
Esempio n. 3
0
 protected BaseController(IDbConnection db, IMetricTracker metrics, ICacheClient cache)
 {
     Db = db;
     Metrics = metrics;
     Log = LogManager.GetLogger(GetType());
     Cache = cache;
     CacheContext = new CacheContext(Cache);
 }
        public async Task TrackPhotoPercentageMetric_NoSettings()
        {
            IEnumerable <Tweet> list = new List <Tweet>();

            _settings.Reset();
            photoPercentageMetric = new PhotoPercentageMetric(_metricSource.Object, _settings.Object);
            Assert.AreEqual(null, await photoPercentageMetric.GetMetric());
        }
 public HomeController(IDocumentSession session, IMetricTracker metrics)
     : base(session, metrics)
 {
 }
Esempio n. 6
0
 public ErrorController(IDbConnection db, ICacheClient cache, IMetricTracker metrics) : base(db, cache, metrics)
 {
 }
 public AccountController(IDocumentSession session, IMetricTracker metrics, IUserAuthenticationService authenticationService)
     : base(session, metrics)
 {
     _authenticationService = authenticationService;
 }
Esempio n. 8
0
 protected ControllerBase(IDbConnection db, ICacheClient cache, IMetricTracker metrics) : this(db, cache)
 {
     Metrics = metrics;
 }
Esempio n. 9
0
 public HomeController(IDbConnection db, IMetricTracker metrics) : base(db, metrics)
 {
 }
 public ProfileActionAttribute()
 {
     Metrics = ObjectFactory.GetInstance <IMetricTracker>();
 }
Esempio n. 11
0
 public HomeController(IDbConnection db, ICacheClient cache, IMetricTracker metrics)
     : base(db, cache, metrics)
 {
 }
Esempio n. 12
0
 public AccountController(IDbConnection db, IMetricTracker metrics, IMailController mailController, IUserAuthenticationService authenticationService) : base(db, metrics)
 {
     _mailController        = mailController;
     _authenticationService = authenticationService;
 }
 public TrackAuthenticationMetricsAttribute()
 {
     Metrics = ObjectFactory.GetInstance <IMetricTracker>();
 }
Esempio n. 14
0
 protected ControllerBase(IDbConnection db, ICacheClient cache, IMetricTracker metrics)
     : this(db, cache)
 {
     Metrics = metrics;
 }
Esempio n. 15
0
 protected BaseController(IDbConnection db, IMetricTracker metrics)
 {
     Db      = db;
     Metrics = metrics;
     Log     = LogManager.GetLogger(GetType());
 }
Esempio n. 16
0
 public AccountController(IDbConnection db, ICacheClient cache, IMetricTracker metrics, IMailController mailController, IUserService userService, IUserAuthenticationService authenticationService) : base(db, cache, metrics)
 {
     _mailController        = mailController;
     _userService           = userService;
     _authenticationService = authenticationService;
 }
Esempio n. 17
0
 protected RavenController(IDocumentSession connection, IMetricTracker metrics)
 {
     RavenSession = connection;
     Metrics = metrics;
     Log = LogManager.GetLogger(GetType());
 }
Esempio n. 18
0
 public WidgetsController(IDbConnection db, ICacheClient cache, IMetricTracker metrics, ISiteSettingsService siteSettingsService) : base(db, cache, metrics)
 {
     _siteSettingsService = siteSettingsService;
 }
Esempio n. 19
0
 protected BaseController(IDbConnection db, ICacheClient cache, IMetricTracker metrics)
     : base(db, cache, metrics)
 {
 }
Esempio n. 20
0
 protected BaseController(IDbConnection db, ICacheClient cache, IMetricTracker metrics) : base(db, cache, metrics)
 {
 }
 public WidgetsController(IDbConnection db, IMetricTracker metrics, ICacheClient cache, ISiteSettingsService siteSettingsService)
     : base(db, metrics, cache)
 {
     _siteSettingsService = siteSettingsService;
 }
Esempio n. 22
0
 public ErrorController(IDbConnection db, IMetricTracker metrics, ICacheClient cache)
     : base(db, metrics, cache)
 {
 }