{"action":"created","comment":{"url":"https://api.github.com/repos/yegor256/cactoos/pulls/comments/185935896","pull_request_review_id":117421836,"id":185935896,"diff_hunk":"@@ -0,0 +1,121 @@\n+/**\n+ * The MIT License (MIT)\n+ *\n+ * Copyright (c) 2017-2018 Yegor Bugayenko\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included\n+ * in all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+ * SOFTWARE.\n+ */\n+package org.cactoos.scalar;\n+\n+import java.nio.ByteBuffer;\n+import org.cactoos.Bytes;\n+import org.hamcrest.MatcherAssert;\n+import org.hamcrest.Matchers;\n+import org.junit.Test;\n+\n+/**\n+ * Test case for {@link Equality}.\n+ * @author Vedran Vatavuk (123vgv@gmail.com)\n+ * @version $Id$\n+ * @since 0.30.1\n+ * @checkstyle JavadocMethodCheck (500 lines)\n+ * @checkstyle MagicNumberCheck (500 lines)\n+ */\n+public final class EqualityTest {\n+\n+    @Test\n+    public void notEqualLeft() throws Exception {\n+        MatcherAssert.assertThat(\n+            new Equality<>(\n+                new EqualityTest.Weight(0), new EqualityTest.Weight(500)\n+            ).value(),\n+            Matchers.equalTo(-1)\n+        );\n+    }\n+\n+    @Test\n+    public void notEqualRight() throws Exception {\n+        MatcherAssert.assertThat(\n+            new Equality<>(\n+                new EqualityTest.Weight(500), new EqualityTest.Weight(0)\n+            ).value(),\n+            Matchers.equalTo(1)","path":"src/test/java/org/cactoos/scalar/EqualityTest.java","position":58,"original_position":58,"commit_id":"06d8ee5896d7ed9fc2342cc6365a9b905ace463d","original_commit_id":"06d8ee5896d7ed9fc2342cc6365a9b905ace463d","user":{"login":"proshin-roman","id":3031372,"avatar_url":"https://avatars0.githubusercontent.com/u/3031372?v=4","gravatar_id":"","url":"https://api.github.com/users/proshin-roman","html_url":"https://github.com/proshin-roman","followers_url":"https://api.github.com/users/proshin-roman/followers","following_url":"https://api.github.com/users/proshin-roman/following{/other_user}","gists_url":"https://api.github.com/users/proshin-roman/gists{/gist_id}","starred_url":"https://api.github.com/users/proshin-roman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/proshin-roman/subscriptions","organizations_url":"https://api.github.com/users/proshin-roman/orgs","repos_url":"https://api.github.com/users/proshin-roman/repos","events_url":"https://api.github.com/users/proshin-roman/events{/privacy}","received_events_url":"https://api.github.com/users/proshin-roman/received_events","type":"User","site_admin":false},"body":"Let's better use `ScalarHasValue` class instead of calling a static method.","created_at":"2018-05-03T21:04:41Z","updated_at":"2018-05-03T21:05:49Z","html_url":"https://github.com/yegor256/cactoos/pull/809#discussion_r185935896","pull_request_url":"https://api.github.com/repos/yegor256/cactoos/pulls/809","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/yegor256/cactoos/pulls/comments/185935896"},"html":{"href":"https://github.com/yegor256/cactoos/pull/809#discussion_r185935896"},"pull_request":{"href":"https://api.github.com/repos/yegor256/cactoos/pulls/809"}}},"pull_request":{"url":"https://api.github.com/repos/yegor256/cactoos/pulls/809","id":185781707,"html_url":"https://github.com/yegor256/cactoos/pull/809","diff_url":"https://github.com/yegor256/cactoos/pull/809.diff","patch_url":"https://github.com/yegor256/cactoos/pull/809.patch","issue_url":"https://api.github.com/repos/yegor256/cactoos/issues/809","number":809,"state":"open","locked":false,"title":"#308 Equality","user":{"login":"Vatavuk","id":2067023,"avatar_url":"https://avatars2.githubusercontent.com/u/2067023?v=4","gravatar_id":"","url":"https://api.github.com/users/Vatavuk","html_url":"https://github.com/Vatavuk","followers_url":"https://api.github.com/users/Vatavuk/followers","following_url":"https://api.github.com/users/Vatavuk/following{/other_user}","gists_url":"https://api.github.com/users/Vatavuk/gists{/gist_id}","starred_url":"https://api.github.com/users/Vatavuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vatavuk/subscriptions","organizations_url":"https://api.github.com/users/Vatavuk/orgs","repos_url":"https://api.github.com/users/Vatavuk/repos","events_url":"https://api.github.com/users/Vatavuk/events{/privacy}","received_events_url":"https://api.github.com/users/Vatavuk/received_events","type":"User","site_admin":false},"body":"Introduced `Equality` for #308 \r\n","created_at":"2018-05-03T17:10:53Z","updated_at":"2018-05-03T21:05:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7cd47935ac0076bdfe737fad36040dd8bfd3c895","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":817650738,"url":"https://api.github.com/repos/yegor256/cactoos/labels/scope","name":"scope","color":"3a6622","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/yegor256/cactoos/pulls/809/commits","review_comments_url":"https://api.github.com/repos/yegor256/cactoos/pulls/809/comments","review_comment_url":"https://api.github.com/repos/yegor256/cactoos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yegor256/cactoos/issues/809/comments","statuses_url":"https://api.github.com/repos/yegor256/cactoos/statuses/06d8ee5896d7ed9fc2342cc6365a9b905ace463d","head":{"label":"Vatavuk:308","ref":"308","sha":"06d8ee5896d7ed9fc2342cc6365a9b905ace463d","user":{"login":"Vatavuk","id":2067023,"avatar_url":"https://avatars2.githubusercontent.com/u/2067023?v=4","gravatar_id":"","url":"https://api.github.com/users/Vatavuk","html_url":"https://github.com/Vatavuk","followers_url":"https://api.github.com/users/Vatavuk/followers","following_url":"https://api.github.com/users/Vatavuk/following{/other_user}","gists_url":"https://api.github.com/users/Vatavuk/gists{/gist_id}","starred_url":"https://api.github.com/users/Vatavuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vatavuk/subscriptions","organizations_url":"https://api.github.com/users/Vatavuk/orgs","repos_url":"https://api.github.com/users/Vatavuk/repos","events_url":"https://api.github.com/users/Vatavuk/events{/privacy}","received_events_url":"https://api.github.com/users/Vatavuk/received_events","type":"User","site_admin":false},"repo":{"id":125088612,"name":"cactoos","full_name":"Vatavuk/cactoos","owner":{"login":"Vatavuk","id":2067023,"avatar_url":"https://avatars2.githubusercontent.com/u/2067023?v=4","gravatar_id":"","url":"https://api.github.com/users/Vatavuk","html_url":"https://github.com/Vatavuk","followers_url":"https://api.github.com/users/Vatavuk/followers","following_url":"https://api.github.com/users/Vatavuk/following{/other_user}","gists_url":"https://api.github.com/users/Vatavuk/gists{/gist_id}","starred_url":"https://api.github.com/users/Vatavuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vatavuk/subscriptions","organizations_url":"https://api.github.com/users/Vatavuk/orgs","repos_url":"https://api.github.com/users/Vatavuk/repos","events_url":"https://api.github.com/users/Vatavuk/events{/privacy}","received_events_url":"https://api.github.com/users/Vatavuk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vatavuk/cactoos","description":"Object-Oriented Java primitives, as an alternative to Google Guava and Apache Commons","fork":true,"url":"https://api.github.com/repos/Vatavuk/cactoos","forks_url":"https://api.github.com/repos/Vatavuk/cactoos/forks","keys_url":"https://api.github.com/repos/Vatavuk/cactoos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vatavuk/cactoos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vatavuk/cactoos/teams","hooks_url":"https://api.github.com/repos/Vatavuk/cactoos/hooks","issue_events_url":"https://api.github.com/repos/Vatavuk/cactoos/issues/events{/number}","events_url":"https://api.github.com/repos/Vatavuk/cactoos/events","assignees_url":"https://api.github.com/repos/Vatavuk/cactoos/assignees{/user}","branches_url":"https://api.github.com/repos/Vatavuk/cactoos/branches{/branch}","tags_url":"https://api.github.com/repos/Vatavuk/cactoos/tags","blobs_url":"https://api.github.com/repos/Vatavuk/cactoos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vatavuk/cactoos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vatavuk/cactoos/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vatavuk/cactoos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vatavuk/cactoos/statuses/{sha}","languages_url":"https://api.github.com/repos/Vatavuk/cactoos/languages","stargazers_url":"https://api.github.com/repos/Vatavuk/cactoos/stargazers","contributors_url":"https://api.github.com/repos/Vatavuk/cactoos/contributors","subscribers_url":"https://api.github.com/repos/Vatavuk/cactoos/subscribers","subscription_url":"https://api.github.com/repos/Vatavuk/cactoos/subscription","commits_url":"https://api.github.com/repos/Vatavuk/cactoos/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vatavuk/cactoos/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vatavuk/cactoos/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vatavuk/cactoos/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vatavuk/cactoos/contents/{+path}","compare_url":"https://api.github.com/repos/Vatavuk/cactoos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vatavuk/cactoos/merges","archive_url":"https://api.github.com/repos/Vatavuk/cactoos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vatavuk/cactoos/downloads","issues_url":"https://api.github.com/repos/Vatavuk/cactoos/issues{/number}","pulls_url":"https://api.github.com/repos/Vatavuk/cactoos/pulls{/number}","milestones_url":"https://api.github.com/repos/Vatavuk/cactoos/milestones{/number}","notifications_url":"https://api.github.com/repos/Vatavuk/cactoos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vatavuk/cactoos/labels{/name}","releases_url":"https://api.github.com/repos/Vatavuk/cactoos/releases{/id}","deployments_url":"https://api.github.com/repos/Vatavuk/cactoos/deployments","created_at":"2018-03-13T17:21:25Z","updated_at":"2018-04-08T17:42:11Z","pushed_at":"2018-05-03T17:06:10Z","git_url":"git://github.com/Vatavuk/cactoos.git","ssh_url":"git@github.com:Vatavuk/cactoos.git","clone_url":"https://github.com/Vatavuk/cactoos.git","svn_url":"https://github.com/Vatavuk/cactoos","homepage":"http://www.cactoos.org","size":1990,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yegor256:master","ref":"master","sha":"9d9dc483e63e3d4e7ae0ca985dcc816a28e76a39","user":{"login":"yegor256","id":526301,"avatar_url":"https://avatars3.githubusercontent.com/u/526301?v=4","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"repo":{"id":92192594,"name":"cactoos","full_name":"yegor256/cactoos","owner":{"login":"yegor256","id":526301,"avatar_url":"https://avatars3.githubusercontent.com/u/526301?v=4","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yegor256/cactoos","description":"Object-Oriented Java primitives, as an alternative to Google Guava and Apache Commons","fork":false,"url":"https://api.github.com/repos/yegor256/cactoos","forks_url":"https://api.github.com/repos/yegor256/cactoos/forks","keys_url":"https://api.github.com/repos/yegor256/cactoos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yegor256/cactoos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yegor256/cactoos/teams","hooks_url":"https://api.github.com/repos/yegor256/cactoos/hooks","issue_events_url":"https://api.github.com/repos/yegor256/cactoos/issues/events{/number}","events_url":"https://api.github.com/repos/yegor256/cactoos/events","assignees_url":"https://api.github.com/repos/yegor256/cactoos/assignees{/user}","branches_url":"https://api.github.com/repos/yegor256/cactoos/branches{/branch}","tags_url":"https://api.github.com/repos/yegor256/cactoos/tags","blobs_url":"https://api.github.com/repos/yegor256/cactoos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yegor256/cactoos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yegor256/cactoos/git/refs{/sha}","trees_url":"https://api.github.com/repos/yegor256/cactoos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yegor256/cactoos/statuses/{sha}","languages_url":"https://api.github.com/repos/yegor256/cactoos/languages","stargazers_url":"https://api.github.com/repos/yegor256/cactoos/stargazers","contributors_url":"https://api.github.com/repos/yegor256/cactoos/contributors","subscribers_url":"https://api.github.com/repos/yegor256/cactoos/subscribers","subscription_url":"https://api.github.com/repos/yegor256/cactoos/subscription","commits_url":"https://api.github.com/repos/yegor256/cactoos/commits{/sha}","git_commits_url":"https://api.github.com/repos/yegor256/cactoos/git/commits{/sha}","comments_url":"https://api.github.com/repos/yegor256/cactoos/comments{/number}","issue_comment_url":"https://api.github.com/repos/yegor256/cactoos/issues/comments{/number}","contents_url":"https://api.github.com/repos/yegor256/cactoos/contents/{+path}","compare_url":"https://api.github.com/repos/yegor256/cactoos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yegor256/cactoos/merges","archive_url":"https://api.github.com/repos/yegor256/cactoos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yegor256/cactoos/downloads","issues_url":"https://api.github.com/repos/yegor256/cactoos/issues{/number}","pulls_url":"https://api.github.com/repos/yegor256/cactoos/pulls{/number}","milestones_url":"https://api.github.com/repos/yegor256/cactoos/milestones{/number}","notifications_url":"https://api.github.com/repos/yegor256/cactoos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yegor256/cactoos/labels{/name}","releases_url":"https://api.github.com/repos/yegor256/cactoos/releases{/id}","deployments_url":"https://api.github.com/repos/yegor256/cactoos/deployments","created_at":"2017-05-23T16:00:02Z","updated_at":"2018-05-03T20:37:53Z","pushed_at":"2018-05-03T20:37:48Z","git_url":"git://github.com/yegor256/cactoos.git","ssh_url":"git@github.com:yegor256/cactoos.git","clone_url":"https://github.com/yegor256/cactoos.git","svn_url":"https://github.com/yegor256/cactoos","homepage":"http://www.cactoos.org","size":1980,"stargazers_count":330,"watchers_count":330,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":79,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":79,"open_issues":47,"watchers":330,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yegor256/cactoos/pulls/809"},"html":{"href":"https://github.com/yegor256/cactoos/pull/809"},"issue":{"href":"https://api.github.com/repos/yegor256/cactoos/issues/809"},"comments":{"href":"https://api.github.com/repos/yegor256/cactoos/issues/809/comments"},"review_comments":{"href":"https://api.github.com/repos/yegor256/cactoos/pulls/809/comments"},"review_comment":{"href":"https://api.github.com/repos/yegor256/cactoos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yegor256/cactoos/pulls/809/commits"},"statuses":{"href":"https://api.github.com/repos/yegor256/cactoos/statuses/06d8ee5896d7ed9fc2342cc6365a9b905ace463d"}},"author_association":"NONE"}}
{"actor":{"display_login":"proshin-roman"}}