コード例 #1
0
        public IHttpActionResult RequestStop(StopModel model)
        {
            var lift        = HttpContext.Current.Application["Lift"];
            var liftService = new LiftService((Lift)lift);

            liftService.RequestStop(model);

            HttpContext.Current.Application["Lift"] = liftService.Lift;
            return(Ok());
        }
コード例 #2
0
ファイル: LiftTests.cs プロジェクト: njeneka/LiftEngine
 public void SummonsToCurrentLevel()
 {
     _liftService.RequestStop(new StopModel(_liftService.Lift.CurrentLevel, DirectionEnum.Up));
     Assert.AreEqual(_liftService.Lift.SummonsUp.Count, 0, "Should not add a stop if already on the specified level");
 }