Example #1
0
        // PUT api/values/5
        //[HttpPut("Rate")]
        //public void Put(int Id, [FromBody] int value)
        //{
        //}

        // DELETE api/values/5
        //[HttpDelete("{id}")]
        //public void Delete(int id)
        //{
        //}


        private MovieViewModel viewModel(Movie movie)
        {
            return(new MovieViewModel(
                       id: movie.MovieId,
                       title: movie.Title,
                       genre: movie.Genre,
                       yearOfRelease: movie.YearOfRelease,
                       runningTimeInMinutes: movie.RunningTimeInMinutes,
                       averageRating: _roundHelper.Round(movie.AverageRating),
                       ratingCount: movie.RatingCount
                       ));
        }
Example #2
0
 public void Test_ShouldReturnListOfMovies(double input, double expectedResult)
 {
     Assert.AreEqual(expectedResult, round.Round(input));
 }