Пример #1
0
        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));
            }
        }
Пример #2
0
        public void GetCustomerInfoTest()
        {
            BorrowedBook b = new BorrowedBook(2);

            Assert.AreEqual(b.CustomerInfo(), "\r\nName: " + CustomerCRUD.getName(2) + "\r\nMoney: " + CustomerCRUD.getMoney(2));
        }
Пример #3
0
 public Customer(int _id)
 {
     CustomerId = _id;
     Name       = CustomerCRUD.getName(_id);
     Money      = CustomerCRUD.getMoney(_id);
 }
Пример #4
0
 public string CustomerInfo()
 {
     return("\r\nName: " + CustomerCRUD.getName(BCustomerId) + "\r\nMoney: " + CustomerCRUD.getMoney(BCustomerId));
 }