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()); }
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"); }