{"action":"created","comment":{"url":"https://api.github.com/repos/fluendo/VAS/pulls/comments/81581402","pull_request_review_id":2549461,"id":81581402,"diff_hunk":"@@ -0,0 +1,85 @@\n+﻿//\n+//  Copyright (C) 2016 Fluendo S.A.\n+//\n+//  This program is free software; you can redistribute it and/or modify\n+//  it under the terms of the GNU General Public License as published by\n+//  the Free Software Foundation; either version 2 of the License, or\n+//  (at your option) any later version.\n+//\n+//  This program is distributed in the hope that it will be useful,\n+//  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n+//  GNU General Public License for more details.\n+//\n+//  You should have received a copy of the GNU General Public License\n+//  along with this program; if not, write to the Free Software\n+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.\n+//\n+using System;\n+using Moq;\n+using NUnit.Framework;\n+using VAS.Core;\n+using VAS.Core.Events;\n+using VAS.Core.Interfaces;\n+using VAS.Core.Interfaces.GUI;\n+using VAS.Services.Controller;\n+using VAS.Services.ViewModel;\n+\n+namespace VAS.Tests.Services\n+{\n+\tpublic class TestPlayListController\n+\t{\n+\t\tMock<IGUIToolkit> mockGuiToolkit;\n+\t\tMock<IPlayerController> mockPlayerController;\n+\t\tMock<IDialogs> mockDiaklogs;\n+\t\tPlayListController controller;\n+\n+\t\t[TestFixtureSetUp ()]\n+\t\tpublic void FixtureSetup ()\n+\t\t{\n+\t\t\tmockPlayerController = new Mock<IPlayerController> ();\n+\t\t\tmockDiaklogs = new Mock<IDialogs> ();\n+\t\t}\n+\n+\t\t[SetUp ()]\n+\t\tpublic void Setup ()\n+\t\t{\n+\t\t\tmockGuiToolkit = new Mock<IGUIToolkit> ();\n+\t\t\tApp.Current.GUIToolkit = mockGuiToolkit.Object;\n+\t\t\tmockDiaklogs = new Mock<IDialogs> ();\n+\t\t\tApp.Current.Dialogs = mockDiaklogs.Object;\n+\t\t\tcontroller = new PlayListController (mockPlayerController.Object);\n+\t\t\tcontroller.Start ();\n+\t\t}\n+\n+\t\t[TearDown ()]\n+\t\tpublic void TearDown ()\n+\t\t{\n+\t\t\tcontroller.Stop ();\n+\t\t}\n+\n+\t\t[Test ()]\n+\t\tpublic void TestNewPlaylist ()\n+\t\t{\n+\t\t\tstring name = \"name\";\n+\t\t\tPlaylistCollectionVM playlistCollectionVM = new PlaylistCollectionVM ();\n+\t\t\tcontroller.SetViewModel (playlistCollectionVM);\n+\n+\t\t\tmockDiaklogs.Setup (m => m.QueryMessage (It.IsAny<string> (), It.IsAny<string> (),\n+\t\t\t\tIt.IsAny<string> (), It.IsAny<object> ())).Returns (AsyncHelpers.Return (name));\n+\n+\t\t\tApp.Current.EventsBroker.Publish<AddPlaylistElementEvent> (\n+\t\t\t\tnew AddPlaylistElementEvent {\n+\t\t\t\t\tPlaylistElements = new System.Collections.Generic.List<IPlaylistElement> ()\n+\t\t\t\t}\n+\t\t\t);\n+\n+\t\t\tmockDiaklogs.Verify (guitoolkit => guitoolkit.QueryMessage (It.IsAny<string> (),\n+\t\t\t\tIt.IsAny<string> (), It.IsAny<string> (), It.IsAny<object> ()), Times.Once ());\n+\n+\t\t\tAssert.AreEqual (1, playlistCollectionVM.ViewModels.Count);\n+\t\t\tAssert.AreEqual (name, playlistCollectionVM.ViewModels [0].Name);\n+\t\t}\n+\n+\t}\n+}","path":"VAS.Tests/Services/TestPlayListController.cs","position":85,"original_position":85,"commit_id":"c93bca1990f060e1d0e47f7a2a4e373b8c42ebd0","original_commit_id":"c93bca1990f060e1d0e47f7a2a4e373b8c42ebd0","user":{"login":"vguzmanp","id":1254383,"avatar_url":"https://avatars.githubusercontent.com/u/1254383?v=3","gravatar_id":"","url":"https://api.github.com/users/vguzmanp","html_url":"https://github.com/vguzmanp","followers_url":"https://api.github.com/users/vguzmanp/followers","following_url":"https://api.github.com/users/vguzmanp/following{/other_user}","gists_url":"https://api.github.com/users/vguzmanp/gists{/gist_id}","starred_url":"https://api.github.com/users/vguzmanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vguzmanp/subscriptions","organizations_url":"https://api.github.com/users/vguzmanp/orgs","repos_url":"https://api.github.com/users/vguzmanp/repos","events_url":"https://api.github.com/users/vguzmanp/events{/privacy}","received_events_url":"https://api.github.com/users/vguzmanp/received_events","type":"User","site_admin":false},"body":"Test also adding to an existing playlist.","created_at":"2016-10-03T16:01:37Z","updated_at":"2016-10-03T16:05:27Z","html_url":"https://github.com/fluendo/VAS/pull/72#discussion_r81581402","pull_request_url":"https://api.github.com/repos/fluendo/VAS/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/fluendo/VAS/pulls/comments/81581402"},"html":{"href":"https://github.com/fluendo/VAS/pull/72#discussion_r81581402"},"pull_request":{"href":"https://api.github.com/repos/fluendo/VAS/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/fluendo/VAS/pulls/72","id":87703437,"html_url":"https://github.com/fluendo/VAS/pull/72","diff_url":"https://github.com/fluendo/VAS/pull/72.diff","patch_url":"https://github.com/fluendo/VAS/pull/72.patch","issue_url":"https://api.github.com/repos/fluendo/VAS/issues/72","number":72,"state":"open","locked":false,"title":"RA-145","user":{"login":"aoller","id":18144948,"avatar_url":"https://avatars.githubusercontent.com/u/18144948?v=3","gravatar_id":"","url":"https://api.github.com/users/aoller","html_url":"https://github.com/aoller","followers_url":"https://api.github.com/users/aoller/followers","following_url":"https://api.github.com/users/aoller/following{/other_user}","gists_url":"https://api.github.com/users/aoller/gists{/gist_id}","starred_url":"https://api.github.com/users/aoller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aoller/subscriptions","organizations_url":"https://api.github.com/users/aoller/orgs","repos_url":"https://api.github.com/users/aoller/repos","events_url":"https://api.github.com/users/aoller/events{/privacy}","received_events_url":"https://api.github.com/users/aoller/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-03T11:53:04Z","updated_at":"2016-10-03T16:05:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db8d3520b0b46df0f063604446feb324ca038e2e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fluendo/VAS/pulls/72/commits","review_comments_url":"https://api.github.com/repos/fluendo/VAS/pulls/72/comments","review_comment_url":"https://api.github.com/repos/fluendo/VAS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fluendo/VAS/issues/72/comments","statuses_url":"https://api.github.com/repos/fluendo/VAS/statuses/c93bca1990f060e1d0e47f7a2a4e373b8c42ebd0","head":{"label":"fluendo:RA-145","ref":"RA-145","sha":"c93bca1990f060e1d0e47f7a2a4e373b8c42ebd0","user":{"login":"fluendo","id":669311,"avatar_url":"https://avatars.githubusercontent.com/u/669311?v=3","gravatar_id":"","url":"https://api.github.com/users/fluendo","html_url":"https://github.com/fluendo","followers_url":"https://api.github.com/users/fluendo/followers","following_url":"https://api.github.com/users/fluendo/following{/other_user}","gists_url":"https://api.github.com/users/fluendo/gists{/gist_id}","starred_url":"https://api.github.com/users/fluendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluendo/subscriptions","organizations_url":"https://api.github.com/users/fluendo/orgs","repos_url":"https://api.github.com/users/fluendo/repos","events_url":"https://api.github.com/users/fluendo/events{/privacy}","received_events_url":"https://api.github.com/users/fluendo/received_events","type":"Organization","site_admin":false},"repo":{"id":54408343,"name":"VAS","full_name":"fluendo/VAS","owner":{"login":"fluendo","id":669311,"avatar_url":"https://avatars.githubusercontent.com/u/669311?v=3","gravatar_id":"","url":"https://api.github.com/users/fluendo","html_url":"https://github.com/fluendo","followers_url":"https://api.github.com/users/fluendo/followers","following_url":"https://api.github.com/users/fluendo/following{/other_user}","gists_url":"https://api.github.com/users/fluendo/gists{/gist_id}","starred_url":"https://api.github.com/users/fluendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluendo/subscriptions","organizations_url":"https://api.github.com/users/fluendo/orgs","repos_url":"https://api.github.com/users/fluendo/repos","events_url":"https://api.github.com/users/fluendo/events{/privacy}","received_events_url":"https://api.github.com/users/fluendo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fluendo/VAS","description":"Core of Video analysis products","fork":false,"url":"https://api.github.com/repos/fluendo/VAS","forks_url":"https://api.github.com/repos/fluendo/VAS/forks","keys_url":"https://api.github.com/repos/fluendo/VAS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fluendo/VAS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fluendo/VAS/teams","hooks_url":"https://api.github.com/repos/fluendo/VAS/hooks","issue_events_url":"https://api.github.com/repos/fluendo/VAS/issues/events{/number}","events_url":"https://api.github.com/repos/fluendo/VAS/events","assignees_url":"https://api.github.com/repos/fluendo/VAS/assignees{/user}","branches_url":"https://api.github.com/repos/fluendo/VAS/branches{/branch}","tags_url":"https://api.github.com/repos/fluendo/VAS/tags","blobs_url":"https://api.github.com/repos/fluendo/VAS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fluendo/VAS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fluendo/VAS/git/refs{/sha}","trees_url":"https://api.github.com/repos/fluendo/VAS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fluendo/VAS/statuses/{sha}","languages_url":"https://api.github.com/repos/fluendo/VAS/languages","stargazers_url":"https://api.github.com/repos/fluendo/VAS/stargazers","contributors_url":"https://api.github.com/repos/fluendo/VAS/contributors","subscribers_url":"https://api.github.com/repos/fluendo/VAS/subscribers","subscription_url":"https://api.github.com/repos/fluendo/VAS/subscription","commits_url":"https://api.github.com/repos/fluendo/VAS/commits{/sha}","git_commits_url":"https://api.github.com/repos/fluendo/VAS/git/commits{/sha}","comments_url":"https://api.github.com/repos/fluendo/VAS/comments{/number}","issue_comment_url":"https://api.github.com/repos/fluendo/VAS/issues/comments{/number}","contents_url":"https://api.github.com/repos/fluendo/VAS/contents/{+path}","compare_url":"https://api.github.com/repos/fluendo/VAS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fluendo/VAS/merges","archive_url":"https://api.github.com/repos/fluendo/VAS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fluendo/VAS/downloads","issues_url":"https://api.github.com/repos/fluendo/VAS/issues{/number}","pulls_url":"https://api.github.com/repos/fluendo/VAS/pulls{/number}","milestones_url":"https://api.github.com/repos/fluendo/VAS/milestones{/number}","notifications_url":"https://api.github.com/repos/fluendo/VAS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fluendo/VAS/labels{/name}","releases_url":"https://api.github.com/repos/fluendo/VAS/releases{/id}","deployments_url":"https://api.github.com/repos/fluendo/VAS/deployments","created_at":"2016-03-21T17:19:39Z","updated_at":"2016-03-23T08:20:08Z","pushed_at":"2016-10-03T14:55:25Z","git_url":"git://github.com/fluendo/VAS.git","ssh_url":"git@github.com:fluendo/VAS.git","clone_url":"https://github.com/fluendo/VAS.git","svn_url":"https://github.com/fluendo/VAS","homepage":null,"size":1102,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"fluendo:master","ref":"master","sha":"108a49e80498f94697d51f6d556e835ca6ae58d2","user":{"login":"fluendo","id":669311,"avatar_url":"https://avatars.githubusercontent.com/u/669311?v=3","gravatar_id":"","url":"https://api.github.com/users/fluendo","html_url":"https://github.com/fluendo","followers_url":"https://api.github.com/users/fluendo/followers","following_url":"https://api.github.com/users/fluendo/following{/other_user}","gists_url":"https://api.github.com/users/fluendo/gists{/gist_id}","starred_url":"https://api.github.com/users/fluendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluendo/subscriptions","organizations_url":"https://api.github.com/users/fluendo/orgs","repos_url":"https://api.github.com/users/fluendo/repos","events_url":"https://api.github.com/users/fluendo/events{/privacy}","received_events_url":"https://api.github.com/users/fluendo/received_events","type":"Organization","site_admin":false},"repo":{"id":54408343,"name":"VAS","full_name":"fluendo/VAS","owner":{"login":"fluendo","id":669311,"avatar_url":"https://avatars.githubusercontent.com/u/669311?v=3","gravatar_id":"","url":"https://api.github.com/users/fluendo","html_url":"https://github.com/fluendo","followers_url":"https://api.github.com/users/fluendo/followers","following_url":"https://api.github.com/users/fluendo/following{/other_user}","gists_url":"https://api.github.com/users/fluendo/gists{/gist_id}","starred_url":"https://api.github.com/users/fluendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluendo/subscriptions","organizations_url":"https://api.github.com/users/fluendo/orgs","repos_url":"https://api.github.com/users/fluendo/repos","events_url":"https://api.github.com/users/fluendo/events{/privacy}","received_events_url":"https://api.github.com/users/fluendo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fluendo/VAS","description":"Core of Video analysis products","fork":false,"url":"https://api.github.com/repos/fluendo/VAS","forks_url":"https://api.github.com/repos/fluendo/VAS/forks","keys_url":"https://api.github.com/repos/fluendo/VAS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fluendo/VAS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fluendo/VAS/teams","hooks_url":"https://api.github.com/repos/fluendo/VAS/hooks","issue_events_url":"https://api.github.com/repos/fluendo/VAS/issues/events{/number}","events_url":"https://api.github.com/repos/fluendo/VAS/events","assignees_url":"https://api.github.com/repos/fluendo/VAS/assignees{/user}","branches_url":"https://api.github.com/repos/fluendo/VAS/branches{/branch}","tags_url":"https://api.github.com/repos/fluendo/VAS/tags","blobs_url":"https://api.github.com/repos/fluendo/VAS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fluendo/VAS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fluendo/VAS/git/refs{/sha}","trees_url":"https://api.github.com/repos/fluendo/VAS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fluendo/VAS/statuses/{sha}","languages_url":"https://api.github.com/repos/fluendo/VAS/languages","stargazers_url":"https://api.github.com/repos/fluendo/VAS/stargazers","contributors_url":"https://api.github.com/repos/fluendo/VAS/contributors","subscribers_url":"https://api.github.com/repos/fluendo/VAS/subscribers","subscription_url":"https://api.github.com/repos/fluendo/VAS/subscription","commits_url":"https://api.github.com/repos/fluendo/VAS/commits{/sha}","git_commits_url":"https://api.github.com/repos/fluendo/VAS/git/commits{/sha}","comments_url":"https://api.github.com/repos/fluendo/VAS/comments{/number}","issue_comment_url":"https://api.github.com/repos/fluendo/VAS/issues/comments{/number}","contents_url":"https://api.github.com/repos/fluendo/VAS/contents/{+path}","compare_url":"https://api.github.com/repos/fluendo/VAS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fluendo/VAS/merges","archive_url":"https://api.github.com/repos/fluendo/VAS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fluendo/VAS/downloads","issues_url":"https://api.github.com/repos/fluendo/VAS/issues{/number}","pulls_url":"https://api.github.com/repos/fluendo/VAS/pulls{/number}","milestones_url":"https://api.github.com/repos/fluendo/VAS/milestones{/number}","notifications_url":"https://api.github.com/repos/fluendo/VAS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fluendo/VAS/labels{/name}","releases_url":"https://api.github.com/repos/fluendo/VAS/releases{/id}","deployments_url":"https://api.github.com/repos/fluendo/VAS/deployments","created_at":"2016-03-21T17:19:39Z","updated_at":"2016-03-23T08:20:08Z","pushed_at":"2016-10-03T14:55:25Z","git_url":"git://github.com/fluendo/VAS.git","ssh_url":"git@github.com:fluendo/VAS.git","clone_url":"https://github.com/fluendo/VAS.git","svn_url":"https://github.com/fluendo/VAS","homepage":null,"size":1102,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fluendo/VAS/pulls/72"},"html":{"href":"https://github.com/fluendo/VAS/pull/72"},"issue":{"href":"https://api.github.com/repos/fluendo/VAS/issues/72"},"comments":{"href":"https://api.github.com/repos/fluendo/VAS/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/fluendo/VAS/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/fluendo/VAS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fluendo/VAS/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/fluendo/VAS/statuses/c93bca1990f060e1d0e47f7a2a4e373b8c42ebd0"}}}}
{"actor":{"display_login":"vguzmanp"}}