public IActionResult Details(int id) { int Id; if (id == 0) { Id = GetMovieId.TranslateIds(_contextService.GetCurrentContext()); } else { Id = id; } if (Id < 0 || Id > 6) { return(NotFound()); } var movieModel = _movieProxy.films(GetMovieId.TranslateIds(Id)); if (movieModel == null) { return(NotFound()); } _contextService.Push(GetMovieId.TranslateIds(Id)); return(View(movieModel)); }
public void EpIdToMovieId() { var movieId = GetMovieId.TranslateIds(1); Assert.Equal(4, movieId); }
public void MovieIdToEpId() { var movieId = GetMovieId.TranslateIds(4); Assert.Equal(1, movieId); }