public void CheckContentOfCustomersCollection() { ListsViewModel listsViewModel = new ListsViewModel(); ObservableCollection <Customer> customers = listsViewModel.GetCustomers(); for (int i = 0; i < customers.Count; i++) { Assert.AreEqual(customers[i].Name, CustomerCRUD.getName(customers[i].CustomerId)); Assert.AreEqual(customers[i].Money, CustomerCRUD.getMoney(customers[i].CustomerId)); } }
public void GetCustomerInfoTest() { BorrowedBook b = new BorrowedBook(2); Assert.AreEqual(b.CustomerInfo(), "\r\nName: " + CustomerCRUD.getName(2) + "\r\nMoney: " + CustomerCRUD.getMoney(2)); }
public Customer(int _id) { CustomerId = _id; Name = CustomerCRUD.getName(_id); Money = CustomerCRUD.getMoney(_id); }
public string CustomerInfo() { return("\r\nName: " + CustomerCRUD.getName(BCustomerId) + "\r\nMoney: " + CustomerCRUD.getMoney(BCustomerId)); }