public void DataTest() { var panel = new BaseListPanel <ListPanelItem>(); Assert.AreEqual(0, panel.DataSource.Count); panel.Refresh(); Assert.AreEqual(100, panel.DataSource.Count); }
public void FocusTest() { var panel = new BaseListPanel <ListPanelItem>(); panel.FocusedItemChanged += ((o, e) => { Assert.IsNotNull(e.FocusedItem); Assert.AreEqual("Lookup2Value99", ((ListPanelItem)e.FocusedItem).Lookup2Field1); }); panel.SelectedItemsChanged += ((o, e) => { Assert.AreEqual(1, e.SelectedItems.Count); Assert.AreEqual("Lookup2Value99", ((ListPanelItem)e.SelectedItems[0]).Lookup2Field1); }); panel.Refresh(); }