public void InsertTest() { var a = new[] { new EClass(1), new EClass(2) }; var l = new EventedList <EClass>(a); l.Insert(1, new EClass(3)); Assert.That(l[1].Prop, Is.EqualTo(3)); }
public void TestInsert() { Init(); m_uut.AddRange(new string[] { "Bob", "Mary", "Sue" }); m_uut.Insert(1, "Paul"); Assert.AreEqual("Bob", m_uut[0]); Assert.AreEqual("Paul", m_uut[1]); Assert.AreEqual("Mary", m_uut[2]); Assert.AreEqual("Sue", m_uut[3]); Assert.AreEqual( "m_uut_AboutToAddItems System.String[] | m_uut_AddedItems System.String[] | m_uut_ContentsChanged | m_uut_AboutToAddItem Paul | m_uut_AddedItem Paul | m_uut_ContentsChanged | ", m_responses ); }