Esempio n. 1
0
        public void TestGetNextFromPool()
        {
            FailoverUriPool pool = new FailoverUriPool(uris);

            Assert.AreEqual(uris[0], pool.GetNext());
            Assert.AreEqual(uris[1], pool.GetNext());
            Assert.AreEqual(uris[2], pool.GetNext());
        }
Esempio n. 2
0
        public void TestGetNextFromSingleValuePool()
        {
            FailoverUriPool pool = new FailoverUriPool(uris.Take(1));

            Assert.AreEqual(uris[0], pool.GetNext());
            Assert.AreEqual(uris[0], pool.GetNext());
            Assert.AreEqual(uris[0], pool.GetNext());
        }
Esempio n. 3
0
        public void TestGetNextFromEmptyPool()
        {
            FailoverUriPool pool = new FailoverUriPool();

            Assert.IsNull(pool.GetNext());
        }
Esempio n. 4
0
        public void TestCreateEmptyPool()
        {
            FailoverUriPool pool = new FailoverUriPool();

            Assert.AreEqual(FailoverUriPool.DEFAULT_RANDOMIZE_ENABLED, pool.IsRandomize);
        }