public void GetCustomerListTypedListTest() { var actual = CustomerQueries.GetCustomerListTypedList(MaxNumberOfItemsToReturn); Assert.AreEqual(MaxNumberOfItemsToReturn, actual.ToList().Count()); Assert.AreEqual(MaxNumberOfItemsToReturn, actual.Count()); }
/// <summary> /// Handles the Click event of the toolStripButtonTypedList control. Example 5.29. pg64. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void toolStripButtonTypedList_Click(object sender, EventArgs e) { bindingSourceCustomerList.DataSource = CustomerQueries.GetCustomerListTypedList(MaxNumberOfItemsToReturn); }