public void CopyToTest() { var d = new UrlDataList("x/y"); string[] array = new string[2]; d.CopyTo(array, 0); Assert.AreEqual(array[0], d[0]); Assert.AreEqual(array[1], d[1]); }
public void AddTest() { var d = new UrlDataList(null); var item = "!!@#$#$"; Assert.Throws <NotSupportedException>(() => { d.Add(item); }, "The UrlData collection is read-only."); }
public void ItemTest() { var d = new UrlDataList("x/y"); Assert.Equal("x", d[0]); Assert.Equal("y", d[1]); }
public void ContainsTest() { var item = "!!@#$#$"; var d = new UrlDataList(item); Assert.Contains(item, d); }
public void GetEnumeratorTest() { var d = new UrlDataList("x"); var e = d.GetEnumerator(); e.MoveNext(); Assert.Equal("x", e.Current); }
public void IndexOfTest() { var item = "!!@#$#$"; var item2 = "13l53125"; var d = new UrlDataList(item+"/"+item2); Assert.IsTrue(d.IndexOf(item) == 0); Assert.IsTrue(d.IndexOf(item2) == 1); }
public void IndexOfTest() { var item = "!!@#$#$"; var item2 = "13l53125"; var d = new UrlDataList(item + "/" + item2); Assert.Equal(0, d.IndexOf(item)); Assert.Equal(1, d.IndexOf(item2)); }
public void CopyToTest() { var d = new UrlDataList("x/y"); string[] array = new string[2]; d.CopyTo(array, 0); Assert.Equal(array[0], d[0]); Assert.Equal(array[1], d[1]); }
public void IndexOfTest() { var item = "!!@#$#$"; var item2 = "13l53125"; var d = new UrlDataList(item + "/" + item2); Assert.True(d.IndexOf(item) == 0); Assert.True(d.IndexOf(item2) == 1); }
public void InsertAtTest() { var d = new UrlDataList("x/y/z"); Assert.Throws <NotSupportedException>( () => { d.Insert(1, "a"); }, "The UrlData collection is read-only." ); }
public void ClearTest() { var d = new UrlDataList(null); Assert.Throws <NotSupportedException>( () => { d.Clear(); }, "The UrlData collection is read-only." ); }
public void RemoveAtTest() { var d = new UrlDataList("x/y"); Assert.Throws <NotSupportedException>( () => { d.RemoveAt(0); }, "The UrlData collection is read-only." ); }
public void AddTest() { var d = new UrlDataList(null); var item = "!!@#$#$"; Assert.Throws<NotSupportedException>(() => { d.Add(item); }, "The UrlData collection is read-only."); }
public void IsReadOnlyTest() { var d = new UrlDataList(null); Assert.True(d.IsReadOnly); }
public void RemoveAtTest() { var d = new UrlDataList("x/y"); Assert.Throws<NotSupportedException>(() => { d.RemoveAt(0); }, "The UrlData collection is read-only."); }
public void ClearTest() { var d = new UrlDataList(null); Assert.Throws<NotSupportedException>(() => { d.Clear(); }, "The UrlData collection is read-only."); }
public void InsertAtTest() { var d = new UrlDataList("x/y/z"); Assert.Throws<NotSupportedException>(() => { d.Insert(1, "a"); }, "The UrlData collection is read-only."); }
public void CountTest() { var d = new UrlDataList("x"); Assert.Equal(1, d.Count); }
public void IsReadOnlyTest() { var d = new UrlDataList(null); Assert.Equal(true, d.IsReadOnly); }
public void CountTest() { var d = new UrlDataList("x"); Assert.Single(d); }
public void ContainsTest() { var item = "!!@#$#$"; var d = new UrlDataList(item); Assert.True(d.Contains(item)); }