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));
        }
Exemplo n.º 4
0
        public FetchedJobsWatcherFacts()
        {
            var options = new RedisStorageOptions()
            {
                Db = RedisUtils.GetDb()
            };

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

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

            _transaction = new Mock <ITransaction>();
        }
Exemplo 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()));
 }
Exemplo n.º 10
0
        public void DbFromConnectionStringIsUsed()
        {
            var storage = new RedisStorage(String.Format("{0},defaultDatabase=5", RedisUtils.GetHostAndPort()));

            Assert.Equal(storage.Db, 5);
        }