public override void Before(MethodInfo methodUnderTest)
        {
            Monitor.Enter(GlobalLock);
            var client = RedisUtils.CreateClient();

            client.Multiplexer.GetServer(RedisUtils.GetHostAndPort()).FlushDatabase(RedisUtils.GetDb());
        }
        public RedisConnectionFacts()
        {
            var options = new RedisStorageOptions()
            {
                Db = RedisUtils.GetDb()
            };

            _storage = new RedisStorage(RedisUtils.GetHostAndPort(), options);
        }
        private RedisStorage CreateStorage()
        {
            var options = new RedisStorageOptions()
            {
                Db = RedisUtils.GetDb()
            };

            return(new RedisStorage(RedisUtils.GetHostAndPort(), options));
        }
Esempio n. 4
0
        public FetchedJobsWatcherFacts()
        {
            var options = new RedisStorageOptions()
            {
                Db = RedisUtils.GetDb()
            };

            _storage = new RedisStorage(RedisUtils.GetHostAndPort(), options);
            _cts     = new CancellationTokenSource();
            _cts.Cancel();
        }
Esempio n. 5
0
        public RedisWriteOnlyTransactionFacts()
        {
            var options = new RedisStorageOptions()
            {
                Db = RedisUtils.GetDb()
            };

            _storage = new RedisStorage(RedisUtils.GetHostAndPort(), options);

            _transaction = new Mock <ITransaction>();
        }
Esempio n. 6
0
        public RedisFetchedJobFacts()
        {
            _redis = new Mock <IDatabase>();

            var options = new RedisStorageOptions()
            {
                Db = RedisUtils.GetDb()
            };

            _storage = new RedisStorage(RedisUtils.GetHostAndPort(), options);
        }
        public RedisSubscriptionFacts()
        {
            _cts = new CancellationTokenSource();

            var options = new RedisStorageOptions()
            {
                Db = RedisUtils.GetDb()
            };

            _storage = new RedisStorage(RedisUtils.GetHostAndPort(), options);

            _subscriber = new Mock <ISubscriber>();
        }
 public FetchedJobsWatcherFacts()
 {
     _storage = new RedisStorage(RedisUtils.GetHostAndPort(), RedisUtils.GetDb());
     _cts     = new CancellationTokenSource();
     _cts.Cancel();
 }
 private RedisStorage CreateStorage()
 {
     return(new RedisStorage(RedisUtils.GetHostAndPort(), RedisUtils.GetDb()));
 }