Beispiel #1
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());
        }
Beispiel #2
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());
        }
Beispiel #3
0
        public void TestGetNextFromEmptyPool()
        {
            FailoverUriPool pool = new FailoverUriPool();

            Assert.IsNull(pool.GetNext());
        }