public LogAddToDayPage(LogAddToDayModel model)
        {
            InitializeComponent();

            viewModel      = model;
            BindingContext = viewModel;
        }
Beispiel #2
0
        public void ConstructorMustConstruct()
        {
            var f = new FoodPerDay();
            var m = new LogAddToDayModel(f);

            Assert.IsNotNull(m);
            Assert.IsNotNull(m.FoodEntry);
            Assert.IsNull(m.FoodRepository);
            Assert.IsNull(m.RecipeRepository);
            Assert.AreEqual(100, m.FoodEntry.Amount);
        }
        public LogAddToDayPage()
        {
            InitializeComponent();
            FoodPerDay entry = new FoodPerDay();

            entry.Food = new FoodModels.Food()
            {
                Name = "Paprika"
            };
            LogAddToDayModel model = new LogAddToDayModel(entry);

            viewModel      = model;
            BindingContext = viewModel;
        }