Пример #1
0
    public void ShowFavorites()
    {
        sceneCatalogView.SetCatalogTitle(FAVORITE_NAME);
        ShowCatalogContent();

        List <Dictionary <string, List <CatalogItem> > > favorites            = new List <Dictionary <string, List <CatalogItem> > >();
        Dictionary <string, List <CatalogItem> >         groupedCategoryItems = new Dictionary <string, List <CatalogItem> >();

        groupedCategoryItems.Add(FAVORITE_NAME, favoritesController.GetFavorites());
        favorites.Add(groupedCategoryItems);

        sceneCatalogView.catalogGroupList.SetContent(favorites);
    }
    void ShowFavorites()
    {
        catalogTitleTxt.text = FAVORITE_NAME;
        ShowCatalogContent();

        List <Dictionary <string, List <CatalogItem> > > favorites            = new List <Dictionary <string, List <CatalogItem> > >();
        Dictionary <string, List <CatalogItem> >         groupedCategoryItems = new Dictionary <string, List <CatalogItem> >();

        groupedCategoryItems.Add(FAVORITE_NAME, favoritesController.GetFavorites());
        favorites.Add(groupedCategoryItems);

        catalogGroupListView.SetContent(favorites);
    }
    void ShowFavorites()
    {
        catalogTitleTxt.text = favoriteName;
        ShowCatalogContent();

        List <Dictionary <string, List <SceneObject> > > favorites           = new List <Dictionary <string, List <SceneObject> > >();
        Dictionary <string, List <SceneObject> >         groupedSceneObjects = new Dictionary <string, List <SceneObject> >();

        groupedSceneObjects.Add(favoriteName, favoritesController.GetFavorites());
        favorites.Add(groupedSceneObjects);

        catalogGroupListView.SetContent(favorites);
    }
Пример #4
0
        public void GetFavorites_ReturnsCorrectFoodItems()
        {
            // ARRANGE
            // Create the controller mocked with identity:
            FavoritesController controller = NewController();

            // ACT

            IEnumerable <Food> foods = controller.GetFavorites();

            // ASSERT

            Food food = foods.First();

            Assert.AreEqual(600, food.Calories);
        }
Пример #5
0
    public void ShowFavorites()
    {
        currentSection = BuildModeCatalogSection.FAVOURITES;
        biwSearchBarController.ReleaseFilters();

        sceneCatalogView.SetCatalogTitle(FAVORITE_NAME);
        ShowCatalogContent();

        List <Dictionary <string, List <CatalogItem> > > favorites            = new List <Dictionary <string, List <CatalogItem> > >();
        Dictionary <string, List <CatalogItem> >         groupedCategoryItems = new Dictionary <string, List <CatalogItem> >();

        groupedCategoryItems.Add(FAVORITE_NAME, favoritesController.GetFavorites());
        favorites.Add(groupedCategoryItems);

        sceneCatalogView.catalogGroupList.SetContent(favorites);
        sceneCatalogView.ShowBackButton(false);
    }
        public void GetFavorites_ReturnsCorrectFoodItems()
        {
            // ARRANGE
            // Create the controller mocked with identity:
            FavoritesController controller = NewController();

            // ACT

            IEnumerable <Food> foods = controller.GetFavorites();

            // ASSERT

            // The new profile username is correctly returned from the database
            Food food = foods.First();

            Assert.AreEqual(600, food.Calories);
        }