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()); }
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()); }
public void TestGetNextFromEmptyPool() { FailoverUriPool pool = new FailoverUriPool(); Assert.IsNull(pool.GetNext()); }
public void TestCreateEmptyPool() { FailoverUriPool pool = new FailoverUriPool(); Assert.AreEqual(FailoverUriPool.DEFAULT_RANDOMIZE_ENABLED, pool.IsRandomize); }