Exemple #1
0
        public void GetNextWeekMenu()
        {
            WeekMenuController weekMenuApi = new WeekMenuController(_unitOfWork);
            WeekYearDto        wyDto       = new WeekYearDto
            {
                Week = 17,
                Year = 2016
            };
            WeekMenuDto dto = weekMenuApi.GetWeekMenu(wyDto).Result;

            Assert.IsNotNull(dto);
        }
Exemple #2
0
        public void WeekMenuTestApi()
        {
            WeekMenuController weekMenuApi = new WeekMenuController(_unitOfWork);
            WeekYearDto        wyDto       = new WeekYearDto
            {
                Week = 18,
                Year = 2016
            };
            WeekMenuDto wmDto = weekMenuApi.GetWeekMenu(wyDto).Result;

            Assert.IsNotNull(wmDto);
        }
Exemple #3
0
        public void TestWeekMenuDelete()
        {
            WeekMenuController weekMenuApi = new WeekMenuController(_unitOfWork);
            WeekYearDto        wyDto       = new WeekYearDto
            {
                Week = 18,
                Year = 2016
            };
            MenuForWeek weekmenu = _menuForWeekService.GetWeekMenuByWeekYear(wyDto);

            if (weekmenu == null)
            {
                WeekMenuDto dto = weekMenuApi.GetWeekMenu(wyDto).Result;
                weekmenu = _menuForWeekService.GetWeekMenuByWeekYear(wyDto);
            }
            var res = weekMenuApi.DeleteMenuForWeek(weekmenu.ID).Result;

            weekmenu = _menuForWeekService.GetWeekMenuByWeekYear(wyDto);

            Assert.IsNull(weekmenu);
        }