public void Genre_add_working_test() { Genre genre = new Genre() { Name = "test2"}; Context context = new Context(); genre = context.Genres.Add(genre); context = new Context(); }
public void Update(Genre genre) { using (var client = new HttpClient()) { HttpResponseMessage response = client.PutAsJsonAsync(ServerAddress.Address + "genre/", genre).Result; } }
public void Remove(Genre genre) { using (var client = new HttpClient()) { HttpResponseMessage response = client.DeleteAsync(ServerAddress.Address + "genre/" + genre.Id).Result; } }
public List<Movie> GetMovieByGenre(Genre genre) { using (var client = new HttpClient()) { HttpResponseMessage response = client.GetAsync(ServerAddress.Address + "Moviesbygenre?id=" + genre.Id).Result; return response.Content.ReadAsAsync<List<Movie>>().Result; } }
public void Genre_getall_returns_multiple_test() { Genre genreOne = new Genre() { Name = "GenreOne" }; Genre genreTwo = new Genre() { Name = "GenreTwo" }; }