Example #1
0
        public FoodOverviewPage()
        {
            InitializeComponent();

            var repo = Injector.Resolve <IFoodRepository>();

            BindingContext = viewModel = new FoodOverviewViewModel(repo);
        }
Example #2
0
        public void ConstructorMustConstruct()
        {
            var repo  = new Mock <IFoodRepository>();
            var model = new FoodOverviewViewModel(repo.Object);

            Assert.IsNotNull(model);
            Assert.IsNotNull(model.FoodRepository);
            Assert.IsNull(model.RecipeRepository);
        }