{"action":"created","comment":{"url":"https://api.github.com/repos/nunit/nunit/pulls/comments/53578676","id":53578676,"diff_hunk":"@@ -231,13 +240,50 @@ private void RunChildren()\n \n         private void CreateChildWorkItems()\n         {\n-            _children = new List<WorkItem>();\n+            Children = new List<WorkItem>();\n \n             foreach (ITest test in _suite.Tests)\n-                if (_childFilter.Pass(test))\n-                    _children.Add(WorkItem.CreateWorkItem(test, _childFilter));\n+                if (_childFilter.Pass(test) && test.Properties.ContainsKey(PropertyNames.Order))\n+                {\n+                        Children.Add(WorkItem.CreateWorkItem(test, _childFilter));\n+                        _countOrder++;\n+                }\n+\n+            foreach (ITest test in _suite.Tests)\n+                if (_childFilter.Pass(test) && !test.Properties.ContainsKey(PropertyNames.Order))\n+                {\n+                    Children.Add(WorkItem.CreateWorkItem(test, _childFilter));\n+                }","path":"src/NUnitFramework/framework/Internal/Execution/CompositeWorkItem.cs","position":70,"original_position":70,"commit_id":"71fdd2c1a429e7aad812bd9fa12bdcabee2c9ddd","original_commit_id":"71fdd2c1a429e7aad812bd9fa12bdcabee2c9ddd","user":{"login":"CharliePoole","id":2678661,"avatar_url":"https://avatars.githubusercontent.com/u/2678661?v=3","gravatar_id":"","url":"https://api.github.com/users/CharliePoole","html_url":"https://github.com/CharliePoole","followers_url":"https://api.github.com/users/CharliePoole/followers","following_url":"https://api.github.com/users/CharliePoole/following{/other_user}","gists_url":"https://api.github.com/users/CharliePoole/gists{/gist_id}","starred_url":"https://api.github.com/users/CharliePoole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CharliePoole/subscriptions","organizations_url":"https://api.github.com/users/CharliePoole/orgs","repos_url":"https://api.github.com/users/CharliePoole/repos","events_url":"https://api.github.com/users/CharliePoole/events{/privacy}","received_events_url":"https://api.github.com/users/CharliePoole/received_events","type":"User","site_admin":false},"body":"Why two separate loops? List.Insert will allow you to stick things at the front of the list as you go through the tests once.","created_at":"2016-02-22T01:10:25Z","updated_at":"2016-02-22T01:10:25Z","html_url":"https://github.com/nunit/nunit/pull/1264#discussion_r53578676","pull_request_url":"https://api.github.com/repos/nunit/nunit/pulls/1264","_links":{"self":{"href":"https://api.github.com/repos/nunit/nunit/pulls/comments/53578676"},"html":{"href":"https://github.com/nunit/nunit/pull/1264#discussion_r53578676"},"pull_request":{"href":"https://api.github.com/repos/nunit/nunit/pulls/1264"}}},"pull_request":{"url":"https://api.github.com/repos/nunit/nunit/pulls/1264","id":59261904,"html_url":"https://github.com/nunit/nunit/pull/1264","diff_url":"https://github.com/nunit/nunit/pull/1264.diff","patch_url":"https://github.com/nunit/nunit/pull/1264.patch","issue_url":"https://api.github.com/repos/nunit/nunit/issues/1264","number":1264,"state":"open","locked":false,"title":"Test order","user":{"login":"dicko2","id":15168410,"avatar_url":"https://avatars.githubusercontent.com/u/15168410?v=3","gravatar_id":"","url":"https://api.github.com/users/dicko2","html_url":"https://github.com/dicko2","followers_url":"https://api.github.com/users/dicko2/followers","following_url":"https://api.github.com/users/dicko2/following{/other_user}","gists_url":"https://api.github.com/users/dicko2/gists{/gist_id}","starred_url":"https://api.github.com/users/dicko2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dicko2/subscriptions","organizations_url":"https://api.github.com/users/dicko2/orgs","repos_url":"https://api.github.com/users/dicko2/repos","events_url":"https://api.github.com/users/dicko2/events{/privacy}","received_events_url":"https://api.github.com/users/dicko2/received_events","type":"User","site_admin":false},"body":"This is based on the example code given here\r\n\r\nhttps://github.com/nunit/nunit/issues/51#issuecomment-64908239\r\n\r\nFor issue #170\r\n\r\nI originally did the same as issue 170, i.e. [TestOrder(1)], but revised this as later in the issues 170 it refers to 51 to get example code so i have implemented it like this [Test(Order = 1)]\r\n\r\nI can move it back to the former if you like, i still have in my commit history.\r\n\r\nI've implemented it as a double as well, I have change to an int but I think this is warranted by the comments in 170.\r\n\r\nAlso to note that I am unsure what to do when tests are mixed with and without orders? Currently its defaulting to 0, so it will technically run Tests without order specified first when mixed, i could change this to MaxInt or something so they would be run last, it's a bit subjective over which one to use so didn't know what to do.\r\n\r\nIf tests have the same order it will run in order of the test name.\r\n\r\n\r\n\r\n\r\n","created_at":"2016-02-13T07:51:31Z","updated_at":"2016-02-22T01:10:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22717cb651d89a9c53508b1e8548388407dd3020","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nunit/nunit/pulls/1264/commits","review_comments_url":"https://api.github.com/repos/nunit/nunit/pulls/1264/comments","review_comment_url":"https://api.github.com/repos/nunit/nunit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nunit/nunit/issues/1264/comments","statuses_url":"https://api.github.com/repos/nunit/nunit/statuses/71fdd2c1a429e7aad812bd9fa12bdcabee2c9ddd","head":{"label":"dicko2:TestOrder","ref":"TestOrder","sha":"71fdd2c1a429e7aad812bd9fa12bdcabee2c9ddd","user":{"login":"dicko2","id":15168410,"avatar_url":"https://avatars.githubusercontent.com/u/15168410?v=3","gravatar_id":"","url":"https://api.github.com/users/dicko2","html_url":"https://github.com/dicko2","followers_url":"https://api.github.com/users/dicko2/followers","following_url":"https://api.github.com/users/dicko2/following{/other_user}","gists_url":"https://api.github.com/users/dicko2/gists{/gist_id}","starred_url":"https://api.github.com/users/dicko2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dicko2/subscriptions","organizations_url":"https://api.github.com/users/dicko2/orgs","repos_url":"https://api.github.com/users/dicko2/repos","events_url":"https://api.github.com/users/dicko2/events{/privacy}","received_events_url":"https://api.github.com/users/dicko2/received_events","type":"User","site_admin":false},"repo":{"id":50760598,"name":"nunit","full_name":"dicko2/nunit","owner":{"login":"dicko2","id":15168410,"avatar_url":"https://avatars.githubusercontent.com/u/15168410?v=3","gravatar_id":"","url":"https://api.github.com/users/dicko2","html_url":"https://github.com/dicko2","followers_url":"https://api.github.com/users/dicko2/followers","following_url":"https://api.github.com/users/dicko2/following{/other_user}","gists_url":"https://api.github.com/users/dicko2/gists{/gist_id}","starred_url":"https://api.github.com/users/dicko2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dicko2/subscriptions","organizations_url":"https://api.github.com/users/dicko2/orgs","repos_url":"https://api.github.com/users/dicko2/repos","events_url":"https://api.github.com/users/dicko2/events{/privacy}","received_events_url":"https://api.github.com/users/dicko2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dicko2/nunit","description":"NUnit 3.0 framework, engine and console runner","fork":true,"url":"https://api.github.com/repos/dicko2/nunit","forks_url":"https://api.github.com/repos/dicko2/nunit/forks","keys_url":"https://api.github.com/repos/dicko2/nunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dicko2/nunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dicko2/nunit/teams","hooks_url":"https://api.github.com/repos/dicko2/nunit/hooks","issue_events_url":"https://api.github.com/repos/dicko2/nunit/issues/events{/number}","events_url":"https://api.github.com/repos/dicko2/nunit/events","assignees_url":"https://api.github.com/repos/dicko2/nunit/assignees{/user}","branches_url":"https://api.github.com/repos/dicko2/nunit/branches{/branch}","tags_url":"https://api.github.com/repos/dicko2/nunit/tags","blobs_url":"https://api.github.com/repos/dicko2/nunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dicko2/nunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dicko2/nunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/dicko2/nunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dicko2/nunit/statuses/{sha}","languages_url":"https://api.github.com/repos/dicko2/nunit/languages","stargazers_url":"https://api.github.com/repos/dicko2/nunit/stargazers","contributors_url":"https://api.github.com/repos/dicko2/nunit/contributors","subscribers_url":"https://api.github.com/repos/dicko2/nunit/subscribers","subscription_url":"https://api.github.com/repos/dicko2/nunit/subscription","commits_url":"https://api.github.com/repos/dicko2/nunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/dicko2/nunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/dicko2/nunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/dicko2/nunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/dicko2/nunit/contents/{+path}","compare_url":"https://api.github.com/repos/dicko2/nunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dicko2/nunit/merges","archive_url":"https://api.github.com/repos/dicko2/nunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dicko2/nunit/downloads","issues_url":"https://api.github.com/repos/dicko2/nunit/issues{/number}","pulls_url":"https://api.github.com/repos/dicko2/nunit/pulls{/number}","milestones_url":"https://api.github.com/repos/dicko2/nunit/milestones{/number}","notifications_url":"https://api.github.com/repos/dicko2/nunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dicko2/nunit/labels{/name}","releases_url":"https://api.github.com/repos/dicko2/nunit/releases{/id}","deployments_url":"https://api.github.com/repos/dicko2/nunit/deployments","created_at":"2016-01-31T05:38:55Z","updated_at":"2016-01-31T05:38:57Z","pushed_at":"2016-02-22T00:53:26Z","git_url":"git://github.com/dicko2/nunit.git","ssh_url":"git@github.com:dicko2/nunit.git","clone_url":"https://github.com/dicko2/nunit.git","svn_url":"https://github.com/dicko2/nunit","homepage":"http://www.nunit.org/","size":29600,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"nunit:master","ref":"master","sha":"ceee4218c010d9461c665794a17225000b185b53","user":{"login":"nunit","id":2678858,"avatar_url":"https://avatars.githubusercontent.com/u/2678858?v=3","gravatar_id":"","url":"https://api.github.com/users/nunit","html_url":"https://github.com/nunit","followers_url":"https://api.github.com/users/nunit/followers","following_url":"https://api.github.com/users/nunit/following{/other_user}","gists_url":"https://api.github.com/users/nunit/gists{/gist_id}","starred_url":"https://api.github.com/users/nunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nunit/subscriptions","organizations_url":"https://api.github.com/users/nunit/orgs","repos_url":"https://api.github.com/users/nunit/repos","events_url":"https://api.github.com/users/nunit/events{/privacy}","received_events_url":"https://api.github.com/users/nunit/received_events","type":"Organization","site_admin":false},"repo":{"id":13692183,"name":"nunit","full_name":"nunit/nunit","owner":{"login":"nunit","id":2678858,"avatar_url":"https://avatars.githubusercontent.com/u/2678858?v=3","gravatar_id":"","url":"https://api.github.com/users/nunit","html_url":"https://github.com/nunit","followers_url":"https://api.github.com/users/nunit/followers","following_url":"https://api.github.com/users/nunit/following{/other_user}","gists_url":"https://api.github.com/users/nunit/gists{/gist_id}","starred_url":"https://api.github.com/users/nunit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nunit/subscriptions","organizations_url":"https://api.github.com/users/nunit/orgs","repos_url":"https://api.github.com/users/nunit/repos","events_url":"https://api.github.com/users/nunit/events{/privacy}","received_events_url":"https://api.github.com/users/nunit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nunit/nunit","description":"NUnit 3.0 framework, engine and console runner","fork":false,"url":"https://api.github.com/repos/nunit/nunit","forks_url":"https://api.github.com/repos/nunit/nunit/forks","keys_url":"https://api.github.com/repos/nunit/nunit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nunit/nunit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nunit/nunit/teams","hooks_url":"https://api.github.com/repos/nunit/nunit/hooks","issue_events_url":"https://api.github.com/repos/nunit/nunit/issues/events{/number}","events_url":"https://api.github.com/repos/nunit/nunit/events","assignees_url":"https://api.github.com/repos/nunit/nunit/assignees{/user}","branches_url":"https://api.github.com/repos/nunit/nunit/branches{/branch}","tags_url":"https://api.github.com/repos/nunit/nunit/tags","blobs_url":"https://api.github.com/repos/nunit/nunit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nunit/nunit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nunit/nunit/git/refs{/sha}","trees_url":"https://api.github.com/repos/nunit/nunit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nunit/nunit/statuses/{sha}","languages_url":"https://api.github.com/repos/nunit/nunit/languages","stargazers_url":"https://api.github.com/repos/nunit/nunit/stargazers","contributors_url":"https://api.github.com/repos/nunit/nunit/contributors","subscribers_url":"https://api.github.com/repos/nunit/nunit/subscribers","subscription_url":"https://api.github.com/repos/nunit/nunit/subscription","commits_url":"https://api.github.com/repos/nunit/nunit/commits{/sha}","git_commits_url":"https://api.github.com/repos/nunit/nunit/git/commits{/sha}","comments_url":"https://api.github.com/repos/nunit/nunit/comments{/number}","issue_comment_url":"https://api.github.com/repos/nunit/nunit/issues/comments{/number}","contents_url":"https://api.github.com/repos/nunit/nunit/contents/{+path}","compare_url":"https://api.github.com/repos/nunit/nunit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nunit/nunit/merges","archive_url":"https://api.github.com/repos/nunit/nunit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nunit/nunit/downloads","issues_url":"https://api.github.com/repos/nunit/nunit/issues{/number}","pulls_url":"https://api.github.com/repos/nunit/nunit/pulls{/number}","milestones_url":"https://api.github.com/repos/nunit/nunit/milestones{/number}","notifications_url":"https://api.github.com/repos/nunit/nunit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nunit/nunit/labels{/name}","releases_url":"https://api.github.com/repos/nunit/nunit/releases{/id}","deployments_url":"https://api.github.com/repos/nunit/nunit/deployments","created_at":"2013-10-18T23:43:29Z","updated_at":"2016-02-20T23:04:02Z","pushed_at":"2016-02-22T00:53:27Z","git_url":"git://github.com/nunit/nunit.git","ssh_url":"git@github.com:nunit/nunit.git","clone_url":"https://github.com/nunit/nunit.git","svn_url":"https://github.com/nunit/nunit","homepage":"http://www.nunit.org/","size":36153,"stargazers_count":551,"watchers_count":551,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":216,"mirror_url":null,"open_issues_count":214,"forks":216,"open_issues":214,"watchers":551,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nunit/nunit/pulls/1264"},"html":{"href":"https://github.com/nunit/nunit/pull/1264"},"issue":{"href":"https://api.github.com/repos/nunit/nunit/issues/1264"},"comments":{"href":"https://api.github.com/repos/nunit/nunit/issues/1264/comments"},"review_comments":{"href":"https://api.github.com/repos/nunit/nunit/pulls/1264/comments"},"review_comment":{"href":"https://api.github.com/repos/nunit/nunit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nunit/nunit/pulls/1264/commits"},"statuses":{"href":"https://api.github.com/repos/nunit/nunit/statuses/71fdd2c1a429e7aad812bd9fa12bdcabee2c9ddd"}}}}