public void SingleCustomerByIdentifierBad()
        {
            int            customerIdentifier = 134;
            CustomerEntity customer           = CustomersOperations.CustomerByIdentifier(customerIdentifier);

            Assert.IsNull(customer);
        }
        public void SingleCustomerByIdentifierGood()
        {
            int            customerIdentifier = 1;
            CustomerEntity customer           = CustomersOperations.CustomerByIdentifier(customerIdentifier);

            Assert.IsNotNull(customer);
            Assert.IsTrue(customer.CompanyName == "Alfreds Futterkiste");
        }
Esempio n. 3
0
        private void Home_Load(object sender, EventArgs e)
        {
            CustomersOperations co = new CustomersOperations();

            co.getAllCustomers();
            displayCustomerOrderForm();
            // setLoad();
        }
 private void setValues(Home home)
 {
     this.home               = home;
     Oo                      = new OrdersOperations();
     Co                      = new CustomersOperations();
     customersTable          = new DataTable();
     customerOrdersTable     = new DataTable();
     currentSelectedCustomer = new Customers();
 }
        public async Task CustomersProject()
        {
            var customers = await CustomersOperations.GetCustomersWithProjectionAsync();

            string firstName = customers
                               .FirstOrDefault(customer => customer.FirstName == "Maria").FirstName;

            Assert.IsTrue(firstName == "Maria");
        }
        private void setValues(CustomersOrders cOrds, Home home)
        {
            this.home  = home;
            this.cOrds = cOrds;
            co         = new CustomersOperations();
            co.COrders = cOrds;

            errorMessage.Visible = false;
        }
        public async Task WhenAll()
        {
            Task <List <CustomerItem> >     customersTask1 = CustomersOperations.GetCustomersWithProjectionAsync();
            Task <List <CustomerItemSort> > customersTask2 = CustomersOperations.GetCustomersWithProjectionSortAsync();
            await Task.WhenAll(customersTask1, customersTask2);

            List <CustomerItem>     test1 = customersTask1.Result;
            List <CustomerItemSort> test2 = customersTask2.Result;

            Assert.AreEqual(customersTask1.Result.Count, 91);
            Assert.AreEqual(customersTask2.Result.Count, 91);
        }
Esempio n. 8
0
        private void setValues(Home home)
        {
            mO = new MedicienOperations();
            co = new CustomersOperations();
            oO = new OrdersOperations();

            dTotalSales = 0;
            dPaid       = 0;
            dDept       = 0;

            listOfDaysSales = new List <Orders>();

            SalesDatePicker.Value = DateTime.Today;

            this.home = home;
        }