Ejemplo n.º 1
0
 public void TestToSublist_OnTypedList_WithOffset_WrapsRemaining()
 {
     ArrayList list = new ArrayList() { 1, 2, 3 };
     var typed = list.Typed<int>();
     var sublist = typed.ToSublist(1);
     Assert.AreSame(typed, sublist.List, "The back list was not set.");
     Assert.AreEqual(1, sublist.Offset, "The offset was not zero.");
     Assert.AreEqual(2, sublist.Count, "The count was wrong.");
 }
Ejemplo n.º 2
0
 public void TestToSublist_OnTypedList_WrapsEntireList()
 {
     ArrayList list = new ArrayList();
     var typed = list.Typed<int>();
     var sublist = typed.ToSublist();
     Assert.AreSame(typed, sublist.List, "The back list was not set.");
     Assert.AreEqual(0, sublist.Offset, "The offset was not zero.");
     Assert.AreEqual(typed.Count, sublist.Count, "The count was wrong.");
 }
Ejemplo n.º 3
0
 public void TestTyped_ArrayList_WrapsList()
 {
     ArrayList list = new ArrayList();
     var typed = list.Typed<int>();
     Assert.AreSame(list, typed.List, "The list was not wrapped.");
 }