예제 #1
0
        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));
        }
예제 #2
0
        public void EpIdToMovieId()
        {
            var movieId = GetMovieId.TranslateIds(1);

            Assert.Equal(4, movieId);
        }
예제 #3
0
        public void MovieIdToEpId()
        {
            var movieId = GetMovieId.TranslateIds(4);

            Assert.Equal(1, movieId);
        }