{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular.io/pulls/comments/52291490","id":52291490,"diff_hunk":"@@ -0,0 +1,63 @@\n+// Simulate a simple test\n+\n+// Reader should look to the testing chapter for the real thing\n+import \"package:angular2/core.dart\";\n+import \"heroes/hero.service.dart\";\n+import \"heroes/hero-list.component.dart\";\n+import 'heroes/hero.dart';\n+\n+@Component(\n+    selector: \"my-tests\",\n+    template: '''\n+    <h2>Tests</h2>\n+    <p id=\"tests\">Tests {{results['pass']}}: {{results['message']}}</p>\n+  ''')\n+class TestComponent {\n+  var results = runTests();\n+}\n+\n+/////////////////////////////////////\n+//#docregion spec\n+var expectedHeroes = [\n+  {\"name\": \"A\"},\n+  {\"name\": \"B\"}\n+];\n+\n+class HeroServiceMock implements HeroService {\n+  @override\n+  getHeroes() => expectedHeroes;\n+}\n+\n+runTests() {\n+  var mockService = new HeroServiceMock();\n+  it(\"should have heroes when HeroListComponent created\", () {\n+    var hlc = new HeroListComponent(mockService);\n+    expect(hlc.heroes.length)['toEqual'](expectedHeroes.length);\n+  });\n+  return testResults;\n+}\n+//#enddocregion spec\n+\n+//////////////////////////////////\n+\n+// Fake Jasmine infrastructure\n+String testName;\n+dynamic testResults;\n+expect(dynamic actual) {\n+  return {\n+    \"toEqual\": (dynamic expected) {\n+      testResults = identical(actual, expected)\n+          ? {\"pass\": \"passed\", \"message\": '''${ testName}'''}","path":"public/docs/_examples/dependency-injection/dart/web/test.component.dart","position":50,"original_position":50,"commit_id":"570aa13ac88d5a1c888ade860a69c3c1dbfffebc","original_commit_id":"570aa13ac88d5a1c888ade860a69c3c1dbfffebc","user":{"login":"zoechi","id":405837,"avatar_url":"https://avatars.githubusercontent.com/u/405837?v=3","gravatar_id":"","url":"https://api.github.com/users/zoechi","html_url":"https://github.com/zoechi","followers_url":"https://api.github.com/users/zoechi/followers","following_url":"https://api.github.com/users/zoechi/following{/other_user}","gists_url":"https://api.github.com/users/zoechi/gists{/gist_id}","starred_url":"https://api.github.com/users/zoechi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoechi/subscriptions","organizations_url":"https://api.github.com/users/zoechi/orgs","repos_url":"https://api.github.com/users/zoechi/repos","events_url":"https://api.github.com/users/zoechi/events{/privacy}","received_events_url":"https://api.github.com/users/zoechi/received_events","type":"User","site_admin":false},"body":"`'''`","created_at":"2016-02-09T10:41:41Z","updated_at":"2016-02-09T10:41:41Z","html_url":"https://github.com/angular/angular.io/pull/817#discussion_r52291490","pull_request_url":"https://api.github.com/repos/angular/angular.io/pulls/817","_links":{"self":{"href":"https://api.github.com/repos/angular/angular.io/pulls/comments/52291490"},"html":{"href":"https://github.com/angular/angular.io/pull/817#discussion_r52291490"},"pull_request":{"href":"https://api.github.com/repos/angular/angular.io/pulls/817"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular.io/pulls/817","id":58524162,"html_url":"https://github.com/angular/angular.io/pull/817","diff_url":"https://github.com/angular/angular.io/pull/817.diff","patch_url":"https://github.com/angular/angular.io/pull/817.patch","issue_url":"https://api.github.com/repos/angular/angular.io/issues/817","number":817,"state":"open","locked":false,"title":"docs(dependency-injection-dart): add samples and doc","user":{"login":"luisvt","id":1688987,"avatar_url":"https://avatars.githubusercontent.com/u/1688987?v=3","gravatar_id":"","url":"https://api.github.com/users/luisvt","html_url":"https://github.com/luisvt","followers_url":"https://api.github.com/users/luisvt/followers","following_url":"https://api.github.com/users/luisvt/following{/other_user}","gists_url":"https://api.github.com/users/luisvt/gists{/gist_id}","starred_url":"https://api.github.com/users/luisvt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisvt/subscriptions","organizations_url":"https://api.github.com/users/luisvt/orgs","repos_url":"https://api.github.com/users/luisvt/repos","events_url":"https://api.github.com/users/luisvt/events{/privacy}","received_events_url":"https://api.github.com/users/luisvt/received_events","type":"User","site_admin":false},"body":"changes:\r\n\r\n* Convert ts samples to dart and add them under folder dart/web\r\n* Edit dependency-injection.jade file\r\n\r\nplease review Provider and Token section","created_at":"2016-02-06T16:48:14Z","updated_at":"2016-02-09T10:41:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"907767affc6c6116cf1240e3960964279a299f7e","assignee":{"login":"kwalrath","id":2164483,"avatar_url":"https://avatars.githubusercontent.com/u/2164483?v=3","gravatar_id":"","url":"https://api.github.com/users/kwalrath","html_url":"https://github.com/kwalrath","followers_url":"https://api.github.com/users/kwalrath/followers","following_url":"https://api.github.com/users/kwalrath/following{/other_user}","gists_url":"https://api.github.com/users/kwalrath/gists{/gist_id}","starred_url":"https://api.github.com/users/kwalrath/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwalrath/subscriptions","organizations_url":"https://api.github.com/users/kwalrath/orgs","repos_url":"https://api.github.com/users/kwalrath/repos","events_url":"https://api.github.com/users/kwalrath/events{/privacy}","received_events_url":"https://api.github.com/users/kwalrath/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular.io/pulls/817/commits","review_comments_url":"https://api.github.com/repos/angular/angular.io/pulls/817/comments","review_comment_url":"https://api.github.com/repos/angular/angular.io/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular.io/issues/817/comments","statuses_url":"https://api.github.com/repos/angular/angular.io/statuses/570aa13ac88d5a1c888ade860a69c3c1dbfffebc","head":{"label":"luisvt:create-dependency-injection-dart-samples","ref":"create-dependency-injection-dart-samples","sha":"570aa13ac88d5a1c888ade860a69c3c1dbfffebc","user":{"login":"luisvt","id":1688987,"avatar_url":"https://avatars.githubusercontent.com/u/1688987?v=3","gravatar_id":"","url":"https://api.github.com/users/luisvt","html_url":"https://github.com/luisvt","followers_url":"https://api.github.com/users/luisvt/followers","following_url":"https://api.github.com/users/luisvt/following{/other_user}","gists_url":"https://api.github.com/users/luisvt/gists{/gist_id}","starred_url":"https://api.github.com/users/luisvt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisvt/subscriptions","organizations_url":"https://api.github.com/users/luisvt/orgs","repos_url":"https://api.github.com/users/luisvt/repos","events_url":"https://api.github.com/users/luisvt/events{/privacy}","received_events_url":"https://api.github.com/users/luisvt/received_events","type":"User","site_admin":false},"repo":{"id":51188693,"name":"angular.io","full_name":"luisvt/angular.io","owner":{"login":"luisvt","id":1688987,"avatar_url":"https://avatars.githubusercontent.com/u/1688987?v=3","gravatar_id":"","url":"https://api.github.com/users/luisvt","html_url":"https://github.com/luisvt","followers_url":"https://api.github.com/users/luisvt/followers","following_url":"https://api.github.com/users/luisvt/following{/other_user}","gists_url":"https://api.github.com/users/luisvt/gists{/gist_id}","starred_url":"https://api.github.com/users/luisvt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luisvt/subscriptions","organizations_url":"https://api.github.com/users/luisvt/orgs","repos_url":"https://api.github.com/users/luisvt/repos","events_url":"https://api.github.com/users/luisvt/events{/privacy}","received_events_url":"https://api.github.com/users/luisvt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/luisvt/angular.io","description":"Website for Angular 2","fork":true,"url":"https://api.github.com/repos/luisvt/angular.io","forks_url":"https://api.github.com/repos/luisvt/angular.io/forks","keys_url":"https://api.github.com/repos/luisvt/angular.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/luisvt/angular.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/luisvt/angular.io/teams","hooks_url":"https://api.github.com/repos/luisvt/angular.io/hooks","issue_events_url":"https://api.github.com/repos/luisvt/angular.io/issues/events{/number}","events_url":"https://api.github.com/repos/luisvt/angular.io/events","assignees_url":"https://api.github.com/repos/luisvt/angular.io/assignees{/user}","branches_url":"https://api.github.com/repos/luisvt/angular.io/branches{/branch}","tags_url":"https://api.github.com/repos/luisvt/angular.io/tags","blobs_url":"https://api.github.com/repos/luisvt/angular.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/luisvt/angular.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/luisvt/angular.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/luisvt/angular.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/luisvt/angular.io/statuses/{sha}","languages_url":"https://api.github.com/repos/luisvt/angular.io/languages","stargazers_url":"https://api.github.com/repos/luisvt/angular.io/stargazers","contributors_url":"https://api.github.com/repos/luisvt/angular.io/contributors","subscribers_url":"https://api.github.com/repos/luisvt/angular.io/subscribers","subscription_url":"https://api.github.com/repos/luisvt/angular.io/subscription","commits_url":"https://api.github.com/repos/luisvt/angular.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/luisvt/angular.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/luisvt/angular.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/luisvt/angular.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/luisvt/angular.io/contents/{+path}","compare_url":"https://api.github.com/repos/luisvt/angular.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/luisvt/angular.io/merges","archive_url":"https://api.github.com/repos/luisvt/angular.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/luisvt/angular.io/downloads","issues_url":"https://api.github.com/repos/luisvt/angular.io/issues{/number}","pulls_url":"https://api.github.com/repos/luisvt/angular.io/pulls{/number}","milestones_url":"https://api.github.com/repos/luisvt/angular.io/milestones{/number}","notifications_url":"https://api.github.com/repos/luisvt/angular.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/luisvt/angular.io/labels{/name}","releases_url":"https://api.github.com/repos/luisvt/angular.io/releases{/id}","deployments_url":"https://api.github.com/repos/luisvt/angular.io/deployments","created_at":"2016-02-06T04:00:31Z","updated_at":"2016-02-06T04:00:35Z","pushed_at":"2016-02-09T06:52:38Z","git_url":"git://github.com/luisvt/angular.io.git","ssh_url":"git@github.com:luisvt/angular.io.git","clone_url":"https://github.com/luisvt/angular.io.git","svn_url":"https://github.com/luisvt/angular.io","homepage":"https://angular.io","size":16372,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"7d5a5fdf846a16a0f2cd6fc91aab8ab07d923bed","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":31985425,"name":"angular.io","full_name":"angular/angular.io","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular.io","description":"Website for Angular 2","fork":false,"url":"https://api.github.com/repos/angular/angular.io","forks_url":"https://api.github.com/repos/angular/angular.io/forks","keys_url":"https://api.github.com/repos/angular/angular.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular.io/teams","hooks_url":"https://api.github.com/repos/angular/angular.io/hooks","issue_events_url":"https://api.github.com/repos/angular/angular.io/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular.io/events","assignees_url":"https://api.github.com/repos/angular/angular.io/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular.io/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular.io/tags","blobs_url":"https://api.github.com/repos/angular/angular.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular.io/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular.io/languages","stargazers_url":"https://api.github.com/repos/angular/angular.io/stargazers","contributors_url":"https://api.github.com/repos/angular/angular.io/contributors","subscribers_url":"https://api.github.com/repos/angular/angular.io/subscribers","subscription_url":"https://api.github.com/repos/angular/angular.io/subscription","commits_url":"https://api.github.com/repos/angular/angular.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular.io/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular.io/merges","archive_url":"https://api.github.com/repos/angular/angular.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular.io/downloads","issues_url":"https://api.github.com/repos/angular/angular.io/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular.io/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular.io/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular.io/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular.io/releases{/id}","deployments_url":"https://api.github.com/repos/angular/angular.io/deployments","created_at":"2015-03-10T22:32:34Z","updated_at":"2016-02-09T07:10:10Z","pushed_at":"2016-02-09T09:21:35Z","git_url":"git://github.com/angular/angular.io.git","ssh_url":"git@github.com:angular/angular.io.git","clone_url":"https://github.com/angular/angular.io.git","svn_url":"https://github.com/angular/angular.io","homepage":"https://angular.io","size":21957,"stargazers_count":236,"watchers_count":236,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":265,"mirror_url":null,"open_issues_count":128,"forks":265,"open_issues":128,"watchers":236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular.io/pulls/817"},"html":{"href":"https://github.com/angular/angular.io/pull/817"},"issue":{"href":"https://api.github.com/repos/angular/angular.io/issues/817"},"comments":{"href":"https://api.github.com/repos/angular/angular.io/issues/817/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular.io/pulls/817/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular.io/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular.io/pulls/817/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular.io/statuses/570aa13ac88d5a1c888ade860a69c3c1dbfffebc"}}}}