{"action":"created","comment":{"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments/45925422","id":45925422,"diff_hunk":"@@ -0,0 +1,61 @@\n+﻿// Copyright (c) .NET Foundation. All rights reserved.\n+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n+\n+using System.Net;\n+using System.Net.Http;\n+using System.Threading.Tasks;\n+using NuGet.Services.BasicSearchTests.Fixtures;\n+using NuGet.Services.BasicSearchTests.Models;\n+using Xunit;\n+\n+namespace NuGet.Services.BasicSearchTests\n+{\n+    public class StartupTests : IClassFixture<StartupTestsFixture>\n+    {\n+        private readonly StartupTestsFixture _fixture;\n+\n+        public StartupTests(StartupTestsFixture fixture)\n+        {\n+            _fixture = fixture;\n+        }\n+\n+        [Fact]\n+        public async Task AutocompleteParameterIsObserved()\n+        {\n+            // Arrange\n+            var app = _fixture.App;\n+            string query = \"Id:angularjs Id:Antlr Id:WebGrease\";\n+\n+            // Act\n+            var withPrereleaseResponse = await app.Client.GetAsync(\"/query?\" + Query(new { q = query, prerelease = true }));\n+            var withPrerelease = await withPrereleaseResponse.Content.ReadAsAsync<QueryResult>();\n+\n+            var withoutPrereleaseResponse = await app.Client.GetAsync(\"/query?\" + Query(new { q = query, prerelease = false }));\n+            var withoutPrerelease = await withoutPrereleaseResponse.Content.ReadAsAsync<QueryResult>();\n+\n+            // Assert\n+            Assert.Equal(HttpStatusCode.OK, withPrereleaseResponse.StatusCode);\n+            Assert.Equal(HttpStatusCode.OK, withoutPrereleaseResponse.StatusCode);\n+\n+            Assert.Equal(\"1.2.0-RC1\", withPrerelease.GetPackageVersion(\"angularjs\"));\n+            Assert.Equal(\"3.4.1.9004-pre\", withPrerelease.GetPackageVersion(\"Antlr\"));","path":"tests/NuGet.Services.BasicSearchTests/StartupTests.cs","position":41,"original_position":41,"commit_id":"2659eb9feee64ebc3216c9e0a384472c9c727f2e","original_commit_id":"d1345de2ef797072a18174133d3c93a0bc5c5f3c","user":{"login":"joyhui","id":4565352,"avatar_url":"https://avatars.githubusercontent.com/u/4565352?v=3","gravatar_id":"","url":"https://api.github.com/users/joyhui","html_url":"https://github.com/joyhui","followers_url":"https://api.github.com/users/joyhui/followers","following_url":"https://api.github.com/users/joyhui/following{/other_user}","gists_url":"https://api.github.com/users/joyhui/gists{/gist_id}","starred_url":"https://api.github.com/users/joyhui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joyhui/subscriptions","organizations_url":"https://api.github.com/users/joyhui/orgs","repos_url":"https://api.github.com/users/joyhui/repos","events_url":"https://api.github.com/users/joyhui/events{/privacy}","received_events_url":"https://api.github.com/users/joyhui/received_events","type":"User","site_admin":false},"body":"It is good always put an failed msg at the end:\r\nAssert.Equal(\"3.4.1.9004-pre\", withPrerelease.GetPackageVersion(\"Antlr\"), \"Antlr package should be returned\");","created_at":"2015-11-25T22:16:18Z","updated_at":"2015-11-25T22:16:18Z","html_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/36#discussion_r45925422","pull_request_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments/45925422"},"html":{"href":"https://github.com/NuGet/NuGet.Services.Metadata/pull/36#discussion_r45925422"},"pull_request":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/36","id":51837041,"html_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/36","diff_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/36.diff","patch_url":"https://github.com/NuGet/NuGet.Services.Metadata/pull/36.patch","issue_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/36","number":36,"state":"open","locked":false,"title":"Add first functional test for the search service","user":{"login":"joelverhagen","id":94054,"avatar_url":"https://avatars.githubusercontent.com/u/94054?v=3","gravatar_id":"","url":"https://api.github.com/users/joelverhagen","html_url":"https://github.com/joelverhagen","followers_url":"https://api.github.com/users/joelverhagen/followers","following_url":"https://api.github.com/users/joelverhagen/following{/other_user}","gists_url":"https://api.github.com/users/joelverhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/joelverhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelverhagen/subscriptions","organizations_url":"https://api.github.com/users/joelverhagen/orgs","repos_url":"https://api.github.com/users/joelverhagen/repos","events_url":"https://api.github.com/users/joelverhagen/events{/privacy}","received_events_url":"https://api.github.com/users/joelverhagen/received_events","type":"User","site_admin":false},"body":"1. Add stitch together code that downloads packages, builds a Lucene index, and starts the server.\r\n2. Add simple functional test for NuGet/Home#833.\r\n\r\nPlease give me any feedback you can on this framework. I am still pretty ignorant about this stuff. Areas in particular that need review:\r\n\r\n- Should we download packages from nuget.org? I am `DataServicePackageRepository` to do this. Alternatives are reading .nupkgs from a share or checking them in maybe?\r\n- Should each test start and stop the service on its own? Right now I use a class fixture to do all of the setup once per *test run*. That is, all tests share the same service, Lucene index, and data directory.\r\n- Are the directories for the test data okay? I am using `Directory.GetCurrentDirectory()` as the base. I think TeamCity cleans this up automatically.\r\n- Should I explicitly clean up the test data? Always? On successful tests (this one may be tricky)?\r\n\r\n@johnataylor @joyhui @maartenba @xavierdecoster @yishaigalatzer ","created_at":"2015-11-25T19:33:38Z","updated_at":"2015-11-25T22:16:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ff8259fc4b41c2911b01b9b8a6d12774aeff275","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/36/commits","review_comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/36/comments","review_comment_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/36/comments","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/2659eb9feee64ebc3216c9e0a384472c9c727f2e","head":{"label":"NuGet:jver-first-func","ref":"jver-first-func","sha":"2659eb9feee64ebc3216c9e0a384472c9c727f2e","user":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"repo":{"id":16930969,"name":"NuGet.Services.Metadata","full_name":"NuGet/NuGet.Services.Metadata","owner":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NuGet/NuGet.Services.Metadata","description":"NuGet's Metadata Service","fork":false,"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata","forks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/forks","keys_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/teams","hooks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/hooks","issue_events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/events{/number}","events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/events","assignees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/assignees{/user}","branches_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/branches{/branch}","tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/tags","blobs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/languages","stargazers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/stargazers","contributors_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contributors","subscribers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscribers","subscription_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscription","commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contents/{+path}","compare_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/merges","archive_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/downloads","issues_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues{/number}","pulls_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/labels{/name}","releases_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/releases{/id}","created_at":"2014-02-18T00:00:53Z","updated_at":"2015-11-01T17:14:47Z","pushed_at":"2015-11-25T22:00:30Z","git_url":"git://github.com/NuGet/NuGet.Services.Metadata.git","ssh_url":"git@github.com:NuGet/NuGet.Services.Metadata.git","clone_url":"https://github.com/NuGet/NuGet.Services.Metadata.git","svn_url":"https://github.com/NuGet/NuGet.Services.Metadata","homepage":null,"size":4384,"stargazers_count":7,"watchers_count":7,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":7,"forks":9,"open_issues":7,"watchers":7,"default_branch":"master"}},"base":{"label":"NuGet:searchcloud","ref":"searchcloud","sha":"91b441ffca0e05ef1f47336c759b0e913677dd15","user":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"repo":{"id":16930969,"name":"NuGet.Services.Metadata","full_name":"NuGet/NuGet.Services.Metadata","owner":{"login":"NuGet","id":968310,"avatar_url":"https://avatars.githubusercontent.com/u/968310?v=3","gravatar_id":"","url":"https://api.github.com/users/NuGet","html_url":"https://github.com/NuGet","followers_url":"https://api.github.com/users/NuGet/followers","following_url":"https://api.github.com/users/NuGet/following{/other_user}","gists_url":"https://api.github.com/users/NuGet/gists{/gist_id}","starred_url":"https://api.github.com/users/NuGet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuGet/subscriptions","organizations_url":"https://api.github.com/users/NuGet/orgs","repos_url":"https://api.github.com/users/NuGet/repos","events_url":"https://api.github.com/users/NuGet/events{/privacy}","received_events_url":"https://api.github.com/users/NuGet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NuGet/NuGet.Services.Metadata","description":"NuGet's Metadata Service","fork":false,"url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata","forks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/forks","keys_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/teams","hooks_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/hooks","issue_events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/events{/number}","events_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/events","assignees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/assignees{/user}","branches_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/branches{/branch}","tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/tags","blobs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/refs{/sha}","trees_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/{sha}","languages_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/languages","stargazers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/stargazers","contributors_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contributors","subscribers_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscribers","subscription_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/subscription","commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/commits{/sha}","git_commits_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/git/commits{/sha}","comments_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/comments{/number}","issue_comment_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/comments{/number}","contents_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/contents/{+path}","compare_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/merges","archive_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/downloads","issues_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues{/number}","pulls_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls{/number}","milestones_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/milestones{/number}","notifications_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/labels{/name}","releases_url":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/releases{/id}","created_at":"2014-02-18T00:00:53Z","updated_at":"2015-11-01T17:14:47Z","pushed_at":"2015-11-25T22:00:30Z","git_url":"git://github.com/NuGet/NuGet.Services.Metadata.git","ssh_url":"git@github.com:NuGet/NuGet.Services.Metadata.git","clone_url":"https://github.com/NuGet/NuGet.Services.Metadata.git","svn_url":"https://github.com/NuGet/NuGet.Services.Metadata","homepage":null,"size":4384,"stargazers_count":7,"watchers_count":7,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":7,"forks":9,"open_issues":7,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/36"},"html":{"href":"https://github.com/NuGet/NuGet.Services.Metadata/pull/36"},"issue":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/36"},"comments":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/NuGet/NuGet.Services.Metadata/statuses/2659eb9feee64ebc3216c9e0a384472c9c727f2e"}}}}