Esempio n. 1
0
        //[TestCategory("TestDevelopment")]
        public void Requires2RoundsWhenGrillIsFilledOnFirstRound()
        {
            var result = (from menu in GrillMenuApiMock.Object.GetAll()
                          where menu.Id.GetValueOrDefault() == System.Guid.Parse("99a08d4b-8e20-4811-beee-1b56ac545f90")
                          select menu).SingleOrDefault();
            var planner = new DefaultGrillMenuPlanner(GrillConfiguration.Default);
            GrillMenuGrillingPlan plan = planner.Plan(result);

            Assert.AreEqual(plan.Rounds, 2);
        }
Esempio n. 2
0
        //[TestCategory("TestDevelopment")]
        public void ThrowsExceptionWhenMenuItemIsOversized()
        {
            var config = GrillConfiguration.Default;

            var menu = new GrillMenuModel()
            {
                Items = new List <GrillMenuItemModel>()
                {
                    new GrillMenuItemModel()
                    {
                        Id = Guid.NewGuid(), Width = config.GrillSize.Width + 1, Length = config.GrillSize.Height + 1, Name = "Oversized Menu 1", Quantity = 1
                    }
                }
            };

            var planner = new DefaultGrillMenuPlanner(config);

            GrillMenuGrillingPlan plan = planner.Plan(menu);
        }