{"action":"created","comment":{"url":"https://api.github.com/repos/DNAinator/dnainator/pulls/comments/33140298","id":33140298,"diff_hunk":"@@ -0,0 +1,79 @@\n+package nl.tudelft.dnainator.javafx.drawables.phylogeny;\n+\n+import static org.junit.Assert.assertEquals;\n+import static org.junit.Assert.assertFalse;\n+import static org.junit.Assert.assertNotNull;\n+import static org.junit.Assert.assertTrue;\n+\n+import java.util.ArrayList;\n+\n+import javafx.collections.FXCollections;\n+import javafx.collections.ObservableList;\n+import javafx.scene.Node;\n+import javafx.scene.shape.Rectangle;\n+import javafx.stage.Stage;\n+\n+import org.junit.Before;\n+import org.junit.Test;\n+import org.mockito.Mockito;\n+import org.mockito.MockitoAnnotations;\n+import org.testfx.framework.junit.ApplicationTest;\n+\n+/**\n+ * Test the {@link CollapsedNode} the phylogenetic tree.\n+ * This is the node that is drawn when an {@link InternalNode} is beign collapsed.\n+ */\n+public class AbstractNodeTest extends ApplicationTest {\n+\n+\tprivate AbstractNode an;\n+\tprivate ObservableList<Node> nodes;\n+\t\n+\t@Override\n+\tpublic void start(Stage stage) throws Exception {\n+\t}\n+\t\n+\t/**\n+\t * Creates new database service.\n+\t */\n+\t@Before\n+\tpublic void setup() {\n+\t\tMockitoAnnotations.initMocks(this);\n+\t\tan = Mockito.mock(AbstractNode.class, Mockito.CALLS_REAL_METHODS);\n+\t\tnodes = FXCollections.observableList(new ArrayList<>());\n+\t\tMockito.when(an.getChildren()).thenReturn(nodes);\n+\t}\n+\t\n+\t/**\n+\t * Test getting the default shape.\n+\t */\n+\t@Test\n+\tpublic void testGetShape() {\n+\t\tRectangle r = (Rectangle) an.getShape();\n+\t\tassertNotNull(r);\n+\t\t// CHECKSTYLE.OFF: MagicNumber\n+\t\tassertEquals(0 - AbstractNode.DIM / 2, r.getX(), 0.001);\n+\t\tassertEquals(0 - AbstractNode.DIM / 2, r.getY(), 0.001);\n+\t\tassertEquals(AbstractNode.DIM, r.getHeight(), 0.001);\n+\t\tassertEquals(AbstractNode.DIM, r.getWidth(), 0.001);\n+\t\t// CHECKSTYLE.ON: MagicNumber\n+\t}\n+\t\n+\t/**\n+\t * Test adding and removing a css style on the children of the {@link AbstractNode}.\n+\t */\n+\t@Test\n+\tpublic void testAddAndRemoveStyle() {\n+\t\t// Add style.\n+\t\tan.getChildren().add(an.getShape());\n+\t\tan.addStyle(\"some style\");\n+\t\t// CHECKSTYLE.OFF: MagicNumber\n+\t\tassertFalse(an.getChildren().get(0).getStyleClass().isEmpty());","path":"dnainator-javafx/src/test/java/nl/tudelft/dnainator/javafx/drawables/phylogeny/AbstractNodeTest.java","position":70,"original_position":70,"commit_id":"b7261ce1a05791d4027c29dadc16b841cc50380c","original_commit_id":"b7261ce1a05791d4027c29dadc16b841cc50380c","user":{"login":"pvanagtmaal","id":5946464,"avatar_url":"https://avatars.githubusercontent.com/u/5946464?v=3","gravatar_id":"","url":"https://api.github.com/users/pvanagtmaal","html_url":"https://github.com/pvanagtmaal","followers_url":"https://api.github.com/users/pvanagtmaal/followers","following_url":"https://api.github.com/users/pvanagtmaal/following{/other_user}","gists_url":"https://api.github.com/users/pvanagtmaal/gists{/gist_id}","starred_url":"https://api.github.com/users/pvanagtmaal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvanagtmaal/subscriptions","organizations_url":"https://api.github.com/users/pvanagtmaal/orgs","repos_url":"https://api.github.com/users/pvanagtmaal/repos","events_url":"https://api.github.com/users/pvanagtmaal/events{/privacy}","received_events_url":"https://api.github.com/users/pvanagtmaal/received_events","type":"User","site_admin":false},"body":"Once more, 0 does not trigger check style","created_at":"2015-06-24T11:56:25Z","updated_at":"2015-06-24T11:56:25Z","html_url":"https://github.com/DNAinator/dnainator/pull/183#discussion_r33140298","pull_request_url":"https://api.github.com/repos/DNAinator/dnainator/pulls/183","_links":{"self":{"href":"https://api.github.com/repos/DNAinator/dnainator/pulls/comments/33140298"},"html":{"href":"https://github.com/DNAinator/dnainator/pull/183#discussion_r33140298"},"pull_request":{"href":"https://api.github.com/repos/DNAinator/dnainator/pulls/183"}}},"pull_request":{"url":"https://api.github.com/repos/DNAinator/dnainator/pulls/183","id":38333370,"html_url":"https://github.com/DNAinator/dnainator/pull/183","diff_url":"https://github.com/DNAinator/dnainator/pull/183.diff","patch_url":"https://github.com/DNAinator/dnainator/pull/183.patch","issue_url":"https://api.github.com/repos/DNAinator/dnainator/issues/183","number":183,"state":"open","locked":false,"title":"[RFC] Frontend tests","user":{"login":"ohuang12","id":5990999,"avatar_url":"https://avatars.githubusercontent.com/u/5990999?v=3","gravatar_id":"","url":"https://api.github.com/users/ohuang12","html_url":"https://github.com/ohuang12","followers_url":"https://api.github.com/users/ohuang12/followers","following_url":"https://api.github.com/users/ohuang12/following{/other_user}","gists_url":"https://api.github.com/users/ohuang12/gists{/gist_id}","starred_url":"https://api.github.com/users/ohuang12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ohuang12/subscriptions","organizations_url":"https://api.github.com/users/ohuang12/orgs","repos_url":"https://api.github.com/users/ohuang12/repos","events_url":"https://api.github.com/users/ohuang12/events{/privacy}","received_events_url":"https://api.github.com/users/ohuang12/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-23T13:00:07Z","updated_at":"2015-06-24T11:56:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"772a2bc58fe54b778ef039852d2694e65828a570","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DNAinator/dnainator/pulls/183/commits","review_comments_url":"https://api.github.com/repos/DNAinator/dnainator/pulls/183/comments","review_comment_url":"https://api.github.com/repos/DNAinator/dnainator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DNAinator/dnainator/issues/183/comments","statuses_url":"https://api.github.com/repos/DNAinator/dnainator/statuses/b7261ce1a05791d4027c29dadc16b841cc50380c","head":{"label":"ohuang12:frontend-tests","ref":"frontend-tests","sha":"b7261ce1a05791d4027c29dadc16b841cc50380c","user":{"login":"ohuang12","id":5990999,"avatar_url":"https://avatars.githubusercontent.com/u/5990999?v=3","gravatar_id":"","url":"https://api.github.com/users/ohuang12","html_url":"https://github.com/ohuang12","followers_url":"https://api.github.com/users/ohuang12/followers","following_url":"https://api.github.com/users/ohuang12/following{/other_user}","gists_url":"https://api.github.com/users/ohuang12/gists{/gist_id}","starred_url":"https://api.github.com/users/ohuang12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ohuang12/subscriptions","organizations_url":"https://api.github.com/users/ohuang12/orgs","repos_url":"https://api.github.com/users/ohuang12/repos","events_url":"https://api.github.com/users/ohuang12/events{/privacy}","received_events_url":"https://api.github.com/users/ohuang12/received_events","type":"User","site_admin":false},"repo":{"id":34922678,"name":"dnainator","full_name":"ohuang12/dnainator","owner":{"login":"ohuang12","id":5990999,"avatar_url":"https://avatars.githubusercontent.com/u/5990999?v=3","gravatar_id":"","url":"https://api.github.com/users/ohuang12","html_url":"https://github.com/ohuang12","followers_url":"https://api.github.com/users/ohuang12/followers","following_url":"https://api.github.com/users/ohuang12/following{/other_user}","gists_url":"https://api.github.com/users/ohuang12/gists{/gist_id}","starred_url":"https://api.github.com/users/ohuang12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ohuang12/subscriptions","organizations_url":"https://api.github.com/users/ohuang12/orgs","repos_url":"https://api.github.com/users/ohuang12/repos","events_url":"https://api.github.com/users/ohuang12/events{/privacy}","received_events_url":"https://api.github.com/users/ohuang12/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ohuang12/dnainator","description":"TI2806 Contextproject","fork":true,"url":"https://api.github.com/repos/ohuang12/dnainator","forks_url":"https://api.github.com/repos/ohuang12/dnainator/forks","keys_url":"https://api.github.com/repos/ohuang12/dnainator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ohuang12/dnainator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ohuang12/dnainator/teams","hooks_url":"https://api.github.com/repos/ohuang12/dnainator/hooks","issue_events_url":"https://api.github.com/repos/ohuang12/dnainator/issues/events{/number}","events_url":"https://api.github.com/repos/ohuang12/dnainator/events","assignees_url":"https://api.github.com/repos/ohuang12/dnainator/assignees{/user}","branches_url":"https://api.github.com/repos/ohuang12/dnainator/branches{/branch}","tags_url":"https://api.github.com/repos/ohuang12/dnainator/tags","blobs_url":"https://api.github.com/repos/ohuang12/dnainator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ohuang12/dnainator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ohuang12/dnainator/git/refs{/sha}","trees_url":"https://api.github.com/repos/ohuang12/dnainator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ohuang12/dnainator/statuses/{sha}","languages_url":"https://api.github.com/repos/ohuang12/dnainator/languages","stargazers_url":"https://api.github.com/repos/ohuang12/dnainator/stargazers","contributors_url":"https://api.github.com/repos/ohuang12/dnainator/contributors","subscribers_url":"https://api.github.com/repos/ohuang12/dnainator/subscribers","subscription_url":"https://api.github.com/repos/ohuang12/dnainator/subscription","commits_url":"https://api.github.com/repos/ohuang12/dnainator/commits{/sha}","git_commits_url":"https://api.github.com/repos/ohuang12/dnainator/git/commits{/sha}","comments_url":"https://api.github.com/repos/ohuang12/dnainator/comments{/number}","issue_comment_url":"https://api.github.com/repos/ohuang12/dnainator/issues/comments{/number}","contents_url":"https://api.github.com/repos/ohuang12/dnainator/contents/{+path}","compare_url":"https://api.github.com/repos/ohuang12/dnainator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ohuang12/dnainator/merges","archive_url":"https://api.github.com/repos/ohuang12/dnainator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ohuang12/dnainator/downloads","issues_url":"https://api.github.com/repos/ohuang12/dnainator/issues{/number}","pulls_url":"https://api.github.com/repos/ohuang12/dnainator/pulls{/number}","milestones_url":"https://api.github.com/repos/ohuang12/dnainator/milestones{/number}","notifications_url":"https://api.github.com/repos/ohuang12/dnainator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ohuang12/dnainator/labels{/name}","releases_url":"https://api.github.com/repos/ohuang12/dnainator/releases{/id}","created_at":"2015-05-01T20:30:50Z","updated_at":"2015-05-08T15:50:23Z","pushed_at":"2015-06-24T00:40:40Z","git_url":"git://github.com/ohuang12/dnainator.git","ssh_url":"git@github.com:ohuang12/dnainator.git","clone_url":"https://github.com/ohuang12/dnainator.git","svn_url":"https://github.com/ohuang12/dnainator","homepage":null,"size":13730,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"DNAinator:master","ref":"master","sha":"502b171bc2df9b6cfe1e1f7dabca4323a6b6424b","user":{"login":"DNAinator","id":12066097,"avatar_url":"https://avatars.githubusercontent.com/u/12066097?v=3","gravatar_id":"","url":"https://api.github.com/users/DNAinator","html_url":"https://github.com/DNAinator","followers_url":"https://api.github.com/users/DNAinator/followers","following_url":"https://api.github.com/users/DNAinator/following{/other_user}","gists_url":"https://api.github.com/users/DNAinator/gists{/gist_id}","starred_url":"https://api.github.com/users/DNAinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DNAinator/subscriptions","organizations_url":"https://api.github.com/users/DNAinator/orgs","repos_url":"https://api.github.com/users/DNAinator/repos","events_url":"https://api.github.com/users/DNAinator/events{/privacy}","received_events_url":"https://api.github.com/users/DNAinator/received_events","type":"Organization","site_admin":false},"repo":{"id":34383905,"name":"dnainator","full_name":"DNAinator/dnainator","owner":{"login":"DNAinator","id":12066097,"avatar_url":"https://avatars.githubusercontent.com/u/12066097?v=3","gravatar_id":"","url":"https://api.github.com/users/DNAinator","html_url":"https://github.com/DNAinator","followers_url":"https://api.github.com/users/DNAinator/followers","following_url":"https://api.github.com/users/DNAinator/following{/other_user}","gists_url":"https://api.github.com/users/DNAinator/gists{/gist_id}","starred_url":"https://api.github.com/users/DNAinator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DNAinator/subscriptions","organizations_url":"https://api.github.com/users/DNAinator/orgs","repos_url":"https://api.github.com/users/DNAinator/repos","events_url":"https://api.github.com/users/DNAinator/events{/privacy}","received_events_url":"https://api.github.com/users/DNAinator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DNAinator/dnainator","description":"TI2806 Contextproject","fork":false,"url":"https://api.github.com/repos/DNAinator/dnainator","forks_url":"https://api.github.com/repos/DNAinator/dnainator/forks","keys_url":"https://api.github.com/repos/DNAinator/dnainator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DNAinator/dnainator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DNAinator/dnainator/teams","hooks_url":"https://api.github.com/repos/DNAinator/dnainator/hooks","issue_events_url":"https://api.github.com/repos/DNAinator/dnainator/issues/events{/number}","events_url":"https://api.github.com/repos/DNAinator/dnainator/events","assignees_url":"https://api.github.com/repos/DNAinator/dnainator/assignees{/user}","branches_url":"https://api.github.com/repos/DNAinator/dnainator/branches{/branch}","tags_url":"https://api.github.com/repos/DNAinator/dnainator/tags","blobs_url":"https://api.github.com/repos/DNAinator/dnainator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DNAinator/dnainator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DNAinator/dnainator/git/refs{/sha}","trees_url":"https://api.github.com/repos/DNAinator/dnainator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DNAinator/dnainator/statuses/{sha}","languages_url":"https://api.github.com/repos/DNAinator/dnainator/languages","stargazers_url":"https://api.github.com/repos/DNAinator/dnainator/stargazers","contributors_url":"https://api.github.com/repos/DNAinator/dnainator/contributors","subscribers_url":"https://api.github.com/repos/DNAinator/dnainator/subscribers","subscription_url":"https://api.github.com/repos/DNAinator/dnainator/subscription","commits_url":"https://api.github.com/repos/DNAinator/dnainator/commits{/sha}","git_commits_url":"https://api.github.com/repos/DNAinator/dnainator/git/commits{/sha}","comments_url":"https://api.github.com/repos/DNAinator/dnainator/comments{/number}","issue_comment_url":"https://api.github.com/repos/DNAinator/dnainator/issues/comments{/number}","contents_url":"https://api.github.com/repos/DNAinator/dnainator/contents/{+path}","compare_url":"https://api.github.com/repos/DNAinator/dnainator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DNAinator/dnainator/merges","archive_url":"https://api.github.com/repos/DNAinator/dnainator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DNAinator/dnainator/downloads","issues_url":"https://api.github.com/repos/DNAinator/dnainator/issues{/number}","pulls_url":"https://api.github.com/repos/DNAinator/dnainator/pulls{/number}","milestones_url":"https://api.github.com/repos/DNAinator/dnainator/milestones{/number}","notifications_url":"https://api.github.com/repos/DNAinator/dnainator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DNAinator/dnainator/labels{/name}","releases_url":"https://api.github.com/repos/DNAinator/dnainator/releases{/id}","created_at":"2015-04-22T10:22:38Z","updated_at":"2015-06-02T19:49:41Z","pushed_at":"2015-06-24T00:40:40Z","git_url":"git://github.com/DNAinator/dnainator.git","ssh_url":"git@github.com:DNAinator/dnainator.git","clone_url":"https://github.com/DNAinator/dnainator.git","svn_url":"https://github.com/DNAinator/dnainator","homepage":null,"size":21720,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":11,"forks":5,"open_issues":11,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DNAinator/dnainator/pulls/183"},"html":{"href":"https://github.com/DNAinator/dnainator/pull/183"},"issue":{"href":"https://api.github.com/repos/DNAinator/dnainator/issues/183"},"comments":{"href":"https://api.github.com/repos/DNAinator/dnainator/issues/183/comments"},"review_comments":{"href":"https://api.github.com/repos/DNAinator/dnainator/pulls/183/comments"},"review_comment":{"href":"https://api.github.com/repos/DNAinator/dnainator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DNAinator/dnainator/pulls/183/commits"},"statuses":{"href":"https://api.github.com/repos/DNAinator/dnainator/statuses/b7261ce1a05791d4027c29dadc16b841cc50380c"}}}}