示例#1
0
        public void CreateCustomersViewModel_Test()
        {
            // Arrange
            var customersList = GenerateCustomers();

            // Act
            var customersVM = new CustomersViewModel(_container, _windowManager, _customerAccess);

            customersVM.LoadCustomers_Run(); // Manually run LoadCustomers()

            // Assert
            Assert.IsType <CustomerModel>(customersVM.NewCustomer);
            Assert.IsType <BindableCollection <CustomerModel> >(customersVM.Customers);
            Assert.True(customersVM.Customers.Count == customersList.Count);
        }