public void InsertOneItem () { itemCollection = this.PlainCollection(); int len = itemCollection.Count(); BaseReportItem r = new BaseReportItem(); r.Name = "Inserted"; itemCollection.Insert(1,r); Assert.AreEqual (len + 1,itemCollection.Count()); // read inserted element and check some default values BaseReportItem r1 = itemCollection.Find("Inserted"); Assert.AreEqual(GlobalValues.DefaultBackColor,r1.BackColor); Assert.AreEqual(System.Drawing.Color.Black,r1.ForeColor); }
public void InsertOneItem() { itemCollection = this.PlainCollection(); int len = itemCollection.Count(); BaseReportItem r = new BaseReportItem(); r.Name = "Inserted"; itemCollection.Insert(1, r); Assert.AreEqual(len + 1, itemCollection.Count()); // read inserted element and check some default values BaseReportItem r1 = itemCollection.Find("Inserted"); Assert.AreEqual(GlobalValues.DefaultBackColor, r1.BackColor); Assert.AreEqual(System.Drawing.Color.Black, r1.ForeColor); }