public void SetUp()
        {
            _mockOnlyIdResponse = new YouTube.OnlyIdResponse
            {
                Items = new List <YouTube.Item> {
                    new YouTube.Item {
                        Id             = "1",
                        ContentDetails = new YouTube.ContentDetails
                        {
                            RelatedPlaylists = new YouTube.RelatedPlaylists
                            {
                                Uploads = "1"
                            },
                            VideoId = "1"
                        }
                    },
                    new YouTube.Item {
                        Id             = "2",
                        ContentDetails = new YouTube.ContentDetails
                        {
                            VideoId = "2"
                        }
                    },
                    new YouTube.Item {
                        Id             = "3",
                        ContentDetails = new YouTube.ContentDetails
                        {
                            VideoId = "3"
                        }
                    }
                }
            };
            _mockOnlyIdResponseSecondPage = new YouTube.OnlyIdResponse
            {
                Items = new List <YouTube.Item> {
                    new YouTube.Item {
                        Id             = "4",
                        ContentDetails = new YouTube.ContentDetails
                        {
                            VideoId = "4"
                        }
                    }
                }
            };
            _mockPlaylistResponse = new YouTube.PlaylistResponse
            {
                Items = new List <YouTube.Playlist> {
                    new YouTube.Playlist {
                        Id      = "1",
                        Snippet = new YouTube.PlaylistSnippet
                        {
                            Title = "Test1"
                        }
                    },
                    new YouTube.Playlist {
                        Id      = "2",
                        Snippet = new YouTube.PlaylistSnippet
                        {
                            Title = "Test2"
                        }
                    },
                    new YouTube.Playlist {
                        Id      = "3",
                        Snippet = new YouTube.PlaylistSnippet
                        {
                            Title = "Test3"
                        }
                    }
                }
            };
            _mockPlaylistResponseSecondPage = new YouTube.PlaylistResponse
            {
                Items = new List <YouTube.Playlist> {
                    new YouTube.Playlist {
                        Id      = "4",
                        Snippet = new YouTube.PlaylistSnippet
                        {
                            Title = "Test4"
                        }
                    }
                }
            };
            _mockVideoResponse = new YouTube.VideoResponse
            {
                Items = new List <YouTube.Video>
                {
                    new YouTube.Video
                    {
                        Id      = "1",
                        Snippet = new YouTube.VideoSnippet
                        {
                            Title = "Test1"
                        }
                    },
                    new YouTube.Video
                    {
                        Id      = "2",
                        Snippet = new YouTube.VideoSnippet
                        {
                            Title = "Test2"
                        }
                    },
                    new YouTube.Video
                    {
                        Id      = "3",
                        Snippet = new YouTube.VideoSnippet
                        {
                            Title = "Test3"
                        }
                    }
                }
            };
            _mockVideoResponseSecondPage = new YouTube.VideoResponse
            {
                Items = new List <YouTube.Video>
                {
                    new YouTube.Video
                    {
                        Id      = "4",
                        Snippet = new YouTube.VideoSnippet
                        {
                            Title = "Test4"
                        }
                    }
                }
            };
            _mockCommentResponse = new YouTube.CommentResponse
            {
                Items = new List <YouTube.Comment>
                {
                    new YouTube.Comment
                    {
                        Id      = "1",
                        Snippet = new YouTube.CommentSnippet
                        {
                            TextDisplay = "Test1"
                        }
                    },
                    new YouTube.Comment
                    {
                        Id      = "2",
                        Snippet = new YouTube.CommentSnippet
                        {
                            TextDisplay = "Test2"
                        }
                    },
                    new YouTube.Comment
                    {
                        Id      = "3",
                        Snippet = new YouTube.CommentSnippet
                        {
                            TextDisplay = "Test3"
                        }
                    }
                }
            };

            _mockCommentThreadResponse = new YouTube.CommentThreadResponse
            {
                Items = new List <YouTube.CommentThread>
                {
                    new YouTube.CommentThread
                    {
                        Id = "1"
                    },
                    new YouTube.CommentThread
                    {
                        Id      = "2",
                        Replies = new YouTube.Replies
                        {
                            Comments = new List <YouTube.Comment>
                            {
                                new YouTube.Comment
                                {
                                    Id = "3"
                                }
                            }
                        }
                    }
                }
            };

            config = new YouTubeConfiguration {
                ApiKey = _apiKey
            };
        }
 /// <summary>
 /// Instantiates a new instance of the <see cref="YouTubeService"/> class.
 /// </summary>
 /// <param name="client">Http Client</param>
 /// <param name="config">Configuration</param>
 public YouTubeService(ISafeHttpClient client, YouTubeConfiguration config)
 {
     _client = client;
     _apiKey = config.ApiKey;
 }
 public YouTubeVideoProvider(string referenceId)
 {
     var item = CmsService.Instance.GetItem<Entity>(new Id(referenceId));
     _configuration = CmsService.Instance.GetConfigurationItem<YouTubeConfiguration>("YouTubeConfiguration", item.Path);
 }