Esempio n. 1
0
 /// <summary>
 ///     Creates the mock unit work
 /// </summary>
 /// <param name="menuItems">Itens to be added to the restaurant menu</param>
 /// <returns></returns>
 private static MockUnitOfWork CreateMockUnitOfWork(ICollection<MenuItem> menuItems)
 {
     var unitOfWork = new MockUnitOfWork();
     unitOfWork.InitializeRepository<Models.Restaurant>();
     var restaurant = new Models.Restaurant
     {
         Menu = new Menu
         {
             MenuId = 1,
             Dishes = menuItems
         }
     };
     unitOfWork.GetRepository<Models.Restaurant>().Insert(restaurant);
     return unitOfWork;
 }