public void ClearAllItems() { itemCollection = this.PlainCollection(); Assert.AreEqual(3, itemCollection.Count); itemCollection.Clear(); Assert.AreEqual(0, itemCollection.Count); }
public void ClearAllItems () { itemCollection = this.PlainCollection(); Assert.AreEqual(3,itemCollection.Count); itemCollection.Clear(); Assert.AreEqual(0,itemCollection.Count); }
private void SaveItem(ReportItemCollection items, string name) { Control container = this.report.MultiView; if (this.report.ItemIndexTable.Contains(name) && !this.report.ItemIndexTable[name].Equals(Guid.Empty)) { Guid id = (Guid)this.report.ItemIndexTable[name]; SaveItem(name, id); } items.Clear(); ListBox listboxItem = (ListBox)container.FindControl(string.Format("{0}{1}", LISTBOX_ITEM, name)); foreach (ListItem li in listboxItem.Items) { Guid id = new Guid(li.Value); byte[] value = (byte[])report.ItemTable[id]; ReportItem reportItem = (ReportItem)XmlConverter.ConvertTo(value); items.Add(reportItem); } }