{"action":"created","issue":{"url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/983","repository_url":"https://api.github.com/repos/joel-costigliola/assertj-core","labels_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/983/labels{/name}","comments_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/983/comments","events_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/983/events","html_url":"https://github.com/joel-costigliola/assertj-core/issues/983","id":226453383,"number":983,"title":"\"contains\" feature in AssertJ not showing the right results (Actual comes under Expecting, and Expected comes under Actual)","user":{"login":"JaspalAujla","id":17103120,"avatar_url":"https://avatars1.githubusercontent.com/u/17103120?v=3","gravatar_id":"","url":"https://api.github.com/users/JaspalAujla","html_url":"https://github.com/JaspalAujla","followers_url":"https://api.github.com/users/JaspalAujla/followers","following_url":"https://api.github.com/users/JaspalAujla/following{/other_user}","gists_url":"https://api.github.com/users/JaspalAujla/gists{/gist_id}","starred_url":"https://api.github.com/users/JaspalAujla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaspalAujla/subscriptions","organizations_url":"https://api.github.com/users/JaspalAujla/orgs","repos_url":"https://api.github.com/users/JaspalAujla/repos","events_url":"https://api.github.com/users/JaspalAujla/events{/privacy}","received_events_url":"https://api.github.com/users/JaspalAujla/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-05-05T01:48:02Z","updated_at":"2017-05-07T23:23:48Z","closed_at":null,"body":"#### Summary\r\ncontains feature in AssertJ not showing the right result.\r\nContent which should reflect in \"Expecting\" is displaying under \"to contain\", however the content which should reflect in \"to contain\" is displaying under \"Expecting\"\r\n\r\n#### Example\r\n```java\r\nassertThat(actual).contains(expected);\r\n```\r\n\r\nPlease refer below image for more clarification. I have written 2 tests. 1st test is with \"isEqualTo\" which is showing right results. However, 2nd test is with \"contains\" which is showing wrong results:\r\n\r\n![assertj_issue](https://cloud.githubusercontent.com/assets/17103120/25731190/4b69890a-3198-11e7-8112-c7dfc4631113.PNG)\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/comments/299743122","html_url":"https://github.com/joel-costigliola/assertj-core/issues/983#issuecomment-299743122","issue_url":"https://api.github.com/repos/joel-costigliola/assertj-core/issues/983","id":299743122,"user":{"login":"JaspalAujla","id":17103120,"avatar_url":"https://avatars1.githubusercontent.com/u/17103120?v=3","gravatar_id":"","url":"https://api.github.com/users/JaspalAujla","html_url":"https://github.com/JaspalAujla","followers_url":"https://api.github.com/users/JaspalAujla/followers","following_url":"https://api.github.com/users/JaspalAujla/following{/other_user}","gists_url":"https://api.github.com/users/JaspalAujla/gists{/gist_id}","starred_url":"https://api.github.com/users/JaspalAujla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JaspalAujla/subscriptions","organizations_url":"https://api.github.com/users/JaspalAujla/orgs","repos_url":"https://api.github.com/users/JaspalAujla/repos","events_url":"https://api.github.com/users/JaspalAujla/events{/privacy}","received_events_url":"https://api.github.com/users/JaspalAujla/received_events","type":"User","site_admin":false},"created_at":"2017-05-07T23:23:48Z","updated_at":"2017-05-07T23:23:48Z","body":"I understand your explanation, but in this way you are taking your implementations away from testing frameworks JUnit or TestNG.\r\nI also understand the way you want to manage your outcomes in grammatically understandable English. But, if you want to prefer this way then you have to implement it every where.\r\n\r\nI noticed, in the case of \"isEqualTo\", you are using ComparisonFailure from junit:\r\nexpected:<\"[expected] text\"> but was:<\"[actual] text\">\r\n\r\nHowever, for other type of comparisons you designed your outputs. Consequently, your output structure is inconsistent in terms of \"isEqualsTo\" and other comparisons, which creates confusion.\r\n\r\nAdditionally, when we talk about testing world, software testing or ISTQB syllabus, Testers, Developers and Business Analyst have a mind set about \"Expected/Expecting\" keyword that is only what we are expecting or want to see as an output.\r\n\r\nThat is why the way you are using \"Expecting\" keyword to show actual outcome is really confusing."}}
{"actor":{"display_login":"JaspalAujla"}}