Ejemplo n.º 1
0
        private void LoadData()
        {
            CoffeeDataService coffeeDataService = new CoffeeDataService();

            coffees = coffeeDataService.GetAllCoffees();
            CoffeeListView.ItemsSource = coffees;
        }
Ejemplo n.º 2
0
        private void LoadData()
        {
            CoffeeDataService coffeeDataService = new CoffeeDataService();

            Coffees = coffeeDataService.GetAllCoffees().ToObservableCollection();
            CoffeeListView.ItemsSource = Coffees;
        }
Ejemplo n.º 3
0
        public CoffeeDetailViewModel()
        {
            coffeeDataService = new CoffeeDataService();
            SaveCommand       = new CustomCommand(SaveCoffee, CanSaveCoffee);
            DeleteCommand     = new CustomCommand(DeleteCoffee, CanDeleteCoffee);

            Messenger.Default.Register <Coffee>(this, OnCoffeeReceived);
        }
        public CoffeeOverviewViewModel()
        {
            coffeeDataService = new CoffeeDataService();
            LoadData();

            LoadCommands();

            Messenger.Default.Register <UpdateListMessage>(this, OnUpdateListMessageReceived);
        }
Ejemplo n.º 5
0
        public void GetCoffeeDetailTest()
        {
            //arrange
            var service = new CoffeeDataService(repository);

            //act
            var coffee = service.GetCoffeeDetail(1);

            //assert
            Assert.IsNotNull(coffee);
        }
 public void SetUp()
 {
     espressoMachineMock = new Mock <IEspressoMachineService>();
     coffeeService       = new CoffeeService(Mapper, espressoMachineMock.Object, Context);
     coffeeDataService   = new CoffeeDataService(Context, Mapper);
 }
Ejemplo n.º 7
0
        private void LoadData()
        {
            CoffeeDataService coffeeDataService = new CoffeeDataService();

            coffees = coffeeDataService.GetAllCoffees().ToObservableCollection();
        }
 public void SetUp()
 {
     coffeeDataService = new CoffeeDataService(Context, Mapper);
 }