René's URL Explorer Experiment


Title: Test Smell: the wrong parameter order in ''assertEquals'' assertion · Issue #1923 · docker-java/docker-java · GitHub

Open Graph Title: Test Smell: the wrong parameter order in ''assertEquals'' assertion · Issue #1923 · docker-java/docker-java

X Title: Test Smell: the wrong parameter order in ''assertEquals'' assertion · Issue #1923 · docker-java/docker-java

Description: Hi! Description: we detect that some assertions in your test code have the wrong parameter orders. For example, the test case named ''copyFromContainerBinaryFile()'' in ''CopyArchiveFromContainerCmdIT.java'' writes the ''assertEquals'' a...

Open Graph Description: Hi! Description: we detect that some assertions in your test code have the wrong parameter orders. For example, the test case named ''copyFromContainerBinaryFile()'' in ''CopyArchiveFromContainerCm...

X Description: Hi! Description: we detect that some assertions in your test code have the wrong parameter orders. For example, the test case named ''copyFromContainerBinaryFile()'' in ''Co...

Opengraph URL: https://github.com/docker-java/docker-java/issues/1923

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Test Smell: the wrong parameter order in ''assertEquals'' assertion","articleBody":"Hi!\r\n\r\nDescription:\r\nwe detect that some assertions in your test code have the wrong parameter orders.\r\nFor example, the test case named ''copyFromContainerBinaryFile()'' in ''CopyArchiveFromContainerCmdIT.java'' writes the ''assertEquals'' assertion as\r\n![image](https://user-images.githubusercontent.com/110402847/184608370-93eb6bdc-b356-4199-856c-81e1fc82fe26.png)\r\nHowever, referring to the API documentation of ''org.junit.Assert’’ is ''assertEquals(Object expected, Object actual)''.\r\n\r\nNegative:\r\nUsing ''assertEquals()'' with the wrong parameter order is a bad test practice.\r\nBecause once the test case fails, the ''assertEquals()'' assertion with the wrong parameter order will give the wrong log information.\r\nThe log information will say:’’ java.lang.AssertionError: expected [actual value] but found [ excepted value]’’, where it should have said \"java.lang.AssertionError: expected [excepted value] but found [actual value]''.\r\nThis is confusing, to say the least, and you shouldn't have to deal with a possible misdirection of that message.\r\n\r\nsolution:\r\nGenerally, the excepted value should be a known value, such as a real number, a string, etc.\r\nThe actual value should be the result of the method-under-test.\r\nThe best way to eliminate the test smell is to exchange the parameter in ''assertEquals'' assertions.\r\n\r\nWe list other test cases with the same problem as follows:\r\n1. copyFromContainerBinaryFile() in CopyArchiveFromContainerCmdIT.java\r\n2. version() in VersionCmdIT.java\r\n3. configuredInstanceAuthConfig() in DockerClientImplTest.java\r\n4. defaults() in DefaultDockerClientConfigTest.java\r\n5. assertTarArchiveEntryIsExecutableFile() in CompressArchiveUtilTest.java\r\n6. serializeCapability() in CapabilityTest.java ...","author":{"url":"https://github.com/TestSmell","@type":"Person","name":"TestSmell"},"datePublished":"2022-08-15T09:19:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1923/docker-java/issues/1923"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0172181c-7115-a51c-05da-ac952acbfe47
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9A32:B6C89:3BB05CE:523D65F:6A4F4829
html-safe-nonce5439b323bf27d87b9334852b1bd2771590fb53c0da741524aae62391dc3d44e4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTMyOkI2Qzg5OjNCQjA1Q0U6NTIzRDY1Rjo2QTRGNDgyOSIsInZpc2l0b3JfaWQiOiIxMzM2MzIwMzA3ODk2NDY5NTQ1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac050a6bd2077012d994b6cbcb42b5661a256e51cb3424c53fdc9b3eede62a0020
hovercard-subject-tagissue:1338742787
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/docker-java/docker-java/1923/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b6229cf2dfb1de1aab40c68ae377f491e7d1d14d54def22c8152754016665902/docker-java/docker-java/issues/1923
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b6229cf2dfb1de1aab40c68ae377f491e7d1d14d54def22c8152754016665902/docker-java/docker-java/issues/1923
og:image:altHi! Description: we detect that some assertions in your test code have the wrong parameter orders. For example, the test case named ''copyFromContainerBinaryFile()'' in ''CopyArchiveFromContainerCm...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameTestSmell
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
go-importgithub.com/docker-java/docker-java git https://github.com/docker-java/docker-java.git
octolytics-dimension-user_id7772003
octolytics-dimension-user_logindocker-java
octolytics-dimension-repository_id20415251
octolytics-dimension-repository_nwodocker-java/docker-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20415251
octolytics-dimension-repository_network_root_nwodocker-java/docker-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4b249b445842943ed31549e027f57a8ade9881ed
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/docker-java/docker-java/issues/1923#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdocker-java%2Fdocker-java%2Fissues%2F1923
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdocker-java%2Fdocker-java%2Fissues%2F1923
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=docker-java%2Fdocker-java
Reloadhttps://github.com/docker-java/docker-java/issues/1923
Reloadhttps://github.com/docker-java/docker-java/issues/1923
Reloadhttps://github.com/docker-java/docker-java/issues/1923
Please reload this pagehttps://github.com/docker-java/docker-java/issues/1923
docker-java https://github.com/docker-java
docker-javahttps://github.com/docker-java/docker-java
Notifications https://github.com/login?return_to=%2Fdocker-java%2Fdocker-java
Fork 1.1k https://github.com/login?return_to=%2Fdocker-java%2Fdocker-java
Star 3.2k https://github.com/login?return_to=%2Fdocker-java%2Fdocker-java
Code https://github.com/docker-java/docker-java
Issues 39 https://github.com/docker-java/docker-java/issues
Pull requests 56 https://github.com/docker-java/docker-java/pulls
Discussions https://github.com/docker-java/docker-java/discussions
Actions https://github.com/docker-java/docker-java/actions
Projects https://github.com/docker-java/docker-java/projects
Security and quality 0 https://github.com/docker-java/docker-java/security
Insights https://github.com/docker-java/docker-java/pulse
Code https://github.com/docker-java/docker-java
Issues https://github.com/docker-java/docker-java/issues
Pull requests https://github.com/docker-java/docker-java/pulls
Discussions https://github.com/docker-java/docker-java/discussions
Actions https://github.com/docker-java/docker-java/actions
Projects https://github.com/docker-java/docker-java/projects
Security and quality https://github.com/docker-java/docker-java/security
Insights https://github.com/docker-java/docker-java/pulse
#2066https://github.com/docker-java/docker-java/pull/2066
Test Smell: the wrong parameter order in ''assertEquals'' assertionhttps://github.com/docker-java/docker-java/issues/1923#top
#2066https://github.com/docker-java/docker-java/pull/2066
https://github.com/TestSmell
TestSmellhttps://github.com/TestSmell
on Aug 15, 2022https://github.com/docker-java/docker-java/issues/1923#issue-1338742787
https://user-images.githubusercontent.com/110402847/184608370-93eb6bdc-b356-4199-856c-81e1fc82fe26.png
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.