1"use strict";(self.webpackChunkrewrite_docs=self.webpackChunkrewrite_docs||[]).push([["10542"],{7523:function(e,s,r){r.r(s),r.d(s,{frontMatter:()=>d,toc:()=>p,default:()=>x,metadata:()=>t,assets:()=>u,contentTitle:()=>o});var t=JSON.parse('{"id":"recipes/java/testing/cleanup/assertfalseequalstoassertnotequals","title":"Replace JUnit `assertFalse(a.equals(b))` to `assertNotEquals(a,b)`","description":"org.openrewrite.java.testing.cleanup.AssertFalseEqualsToAssertNotEquals","source":"@site/docs/recipes/java/testing/cleanup/assertfalseequalstoassertnotequals.md","sourceDirName":"recipes/java/testing/cleanup","slug":"/recipes/java/testing/cleanup/assertfalseequalstoassertnotequals","permalink":"/recipes/java/testing/cleanup/assertfalseequalstoassertnotequals","draft":false,"unlisted":false,"editUrl":"https://github.com/openrewrite/rewrite-docs/edit/master/docs/recipes/java/testing/cleanup/assertfalseequalstoassertnotequals.md","tags":[],"version":"current","frontMatter":{"title":"Replace JUnit `assertFalse(a.equals(b))` to `assertNotEquals(a,b)`","sidebar_label":"Replace JUnit `assertFalse(a.equals(b))` to `assertNotEquals(a,b)`"},"sidebar":"docs","previous":{"title":"`assertEquals(a, null)` to `assertNull(a)`","permalink":"/recipes/java/testing/cleanup/assertequalsnulltoassertnull"},"next":{"title":"Replace JUnit `assertFalse(!<boolean>)` to `assertTrue(<boolean>)`","permalink":"/recipes/java/testing/cleanup/assertfalsenegationtoasserttrue"}}'),a=r(74848),i=r(84429),l=r(84109),n=r(93703),c=r(70440),h=r(48416);let d={title:"Replace JUnit `assertFalse(a.equals(b))` to `assertNotEquals(a,b)`",sidebar_label:"Replace JUnit `assertFalse(a.equals(b))` to `assertNotEquals(a,b)`"},o="Replace JUnit assertFalse(a.equals(b)) to assertNotEquals(a,b)",u={},p=[{value:"Recipe source",id:"recipe-source",level:2},{value:"Used by",id:"used-by",level:2},{value:"Usage",id:"usage",level:2},{value:"See how this recipe works across multiple open-source repositories",id:"see-how-this-recipe-works-across-multiple-open-source-repositories",level:2},{value:"Data Tables",id:"data-tables",level:2},{value:"Source files that had results",id:"source-files-that-had-results",level:3},{value:"Source files that had search results",id:"source-files-that-had-search-results",level:3},{value:"Source files that errored on a recipe",id:"source-files-that-errored-on-a-recipe",level:3},{value:"Recipe performance",id:"recipe-performance",level:3}];function j(e){let s={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.header,{children:(0,a.jsxs)(s.h1,{id:"replace-junit-assertfalseaequalsb-to-assertnotequalsab",children:["Replace JUnit ",(0,a.jsx)(s.code,{children:"assertFalse(a.equals(b))"})," to ",(0,a.jsx)(s.code,{children:"assertNotEquals(a,b)"})]})}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsx)(s.strong,{children:"org.openrewrite.java.testing.cleanup.AssertFalseEqualsToAssertNotEquals"})}),"\n",(0,a.jsx)(s.p,{children:(0,a.jsxs)(s.em,{children:["Using ",(0,a.jsx)(s.code,{children:"assertNotEquals(a,b)"})," is simpler and more clear."]})}),"\n",(0,a.jsx)(s.h2,{id:"recipe-source",children:"Recipe source"}),"\n",(0,a.jsxs)(s.p,{children:[(0,a.jsx)(s.a,{href:"https://github.com/openrewrite/rewrite-testing-frameworks/blob/main/src/main/java/org/openrewrite/java/testing/cleanup/AssertFalseEqualsToAssertNotEquals.java",children:"GitHub: AssertFalseEqualsToAssertNotEquals.java"}),",\n",(0,a.jsx)(s.a,{href:"https://github.com/openrewrite/rewrite-testing-frameworks/issues",children:"Issue Tracker"}),",\n",(0,a.jsx)(s.a,{href:"https://artifacts.codegenomeproject.org/maven/org/openrewrite/recipe/rewrite-testing-frameworks/",children:"Code Genome Project"})]}),"\n",(0,a.jsxs)(s.p,{children:["This recipe is available under the ",(0,a.jsx)(s.a,{href:"https://docs.moderne.io/licensing/moderne-source-available-license",children:"Moderne Source Available License"}),". Moderne customers can download precompiled artifacts from The Code Genome Project. For non-commercial use you can build the artifact from source locally."]}),"\n",(0,a.jsx)(s.h2,{id:"used-by",children:"Used by"}),"\n",(0,a.jsx)(s.p,{children:"This recipe is used as part of the following composite recipes:"}),"\n",(0,a.jsxs)(s.ul,{children:["\n",(0,a.jsx)(s.li,{children:(0,a.jsx)(s.a,{href:"/recipes/java/testing/junit5/cleanupassertions",children:"Clean Up Assertions"})}),"\n"]}),"\n",(0,a.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,a.jsx)(c.A,{recipeName:"org.openrewrite.java.testing.cleanup.AssertFalseEqualsToAssertNotEquals",displayName:"Replace JUnit `assertFalse(a.equals(b))` to `assertNotEquals(a,b)`",groupId:"org.openrewrite.recipe",artifactId:"rewrite-testing-frameworks",versionKey:"VERSION_ORG_OPENREWRITE_RECIPE_REWRITE_TESTING_FRAMEWORKS",hasDataTables:!0}),"\n",(0,a.jsx)(s.h2,{id:"see-how-this-recipe-works-across-multiple-open-source-repositories",children:"See how this recipe works across multiple open-source repositories"}
1),"\n","\n",(0,a.jsx)(h.A,{link:"https://app.moderne.io/recipes/org.openrewrite.java.testing.cleanup.AssertFalseEqualsToAssertNotEquals"}),"\n",(0,a.jsx)(s.p,{children:"The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories."}),"\n",(0,a.jsxs)(s.p,{children:["Please ",(0,a.jsx)(s.a,{href:"https://moderne.io/product",children:"contact Moderne"})," for more information about safely running the recipes on your own codebase in a private SaaS."]}),"\n",(0,a.jsx)(s.h2,{id:"data-tables",children:"Data Tables"}),"\n",(0,a.jsxs)(l.A,{groupId:"data-tables",children:[(0,a.jsxs)(n.A,{value:"org.openrewrite.table.SourcesFileResults",label:"SourcesFileResults",children:[(0,a.jsx)(s.h3,{id:"source-files-that-had-results",children:"Source files that had results"}),(0,a.jsx)(s.p,{children:(0,a.jsx)(s.strong,{children:"org.openrewrite.table.SourcesFileResults"})}),(0,a.jsx)(s.p,{children:(0,a.jsx)(s.em,{children:"Source files that were modified by the recipe run."})}),(0,a.jsxs)(s.table,{children:[(0,a.jsx)(s.thead,{children:(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.th,{children:"Column Name"}),(0,a.jsx)(s.th,{children:"Description"})]})}),(0,a.jsxs)(s.tbody,{children:[(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Source path before the run"}),(0,a.jsxs)(s.td,{children:["The source path of the file before the run. ",(0,a.jsx)(s.code,{children:"null"})," when a source file was created during the run."]})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Source path after the run"}),(0,a.jsxs)(s.td,{children:["A recipe may modify the source path. This is the path after the run. ",(0,a.jsx)(s.code,{children:"null"})," when a source file was deleted during the run."]})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Parent of the recipe that made changes"}),(0,a.jsx)(s.td,{children:"In a hierarchical recipe, the parent of the recipe that made a change. Empty if this is the root of a hierarchy or if the recipe is not hierarchical at all."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Recipe that made changes"}),(0,a.jsx)(s.td,{children:"The specific recipe that made a change."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Estimated time saving"}),(0,a.jsx)(s.td,{children:"An estimated effort that a developer to fix manually instead of using this recipe, in unit of seconds."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Cycle"}),(0,a.jsx)(s.td,{children:"The recipe cycle in which the change was made."})]})]})]})]}),(0,a.jsxs)(n.A,{value:"org.openrewrite.table.SearchResults",label:"SearchResults",children:[(0,a.jsx)(s.h3,{id:"source-files-that-had-search-results",children:"Source files that had search results"}),(0,a.jsx)(s.p,{children:(0,a.jsx)(s.strong,{children:"org.openrewrite.table.SearchResults"})}),(0,a.jsx)(s.p,{children:(0,a.jsx)(s.em,{children:"Search results that were found during the recipe run."})}),(0,a.jsxs)(s.table,{children:[(0,a.jsx)(s.thead,{children:(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.th,{children:"Column Name"}),(0,a.jsx)(s.th,{children:"Description"})]})}),(0,a.jsxs)(s.tbody,{children:[(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Source path of search result before the run"}),(0,a.jsx)(s.td,{children:"The source path of the file with the search result markers present."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Source path of search result after run the run"}),(0,a.jsxs)(s.td,{children:["A recipe may modify the source path. This is the path after the run. ",(0,a.jsx)(s.code,{children:"null"})," when a source file was deleted during the run."]})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Result"}),(0,a.jsx)(s.td,{children:"The trimmed printed tree of the LST element that the marker is attached to."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Description"}),(0,a.jsx)(s.td,{children:"The content of the description of the marker."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Recipe that added the search marker"}),(0,a.jsx)(s.td,{children:"The specific recipe that added the Search marker."})]})]})]})]}),(0,a.jsxs)(n.A,{value:"org.openrewrite.table.SourcesFileErrors",label:"SourcesFileErrors",children:[(0,a.jsx)(s.h3,{id:"source-files-that-errored-on-a-recipe",children:"Source files that errored on a recipe"}),(0,a.jsx)(s.p,{children:(0,a.jsx)(s.strong,{children:"org.openrewrite.table.SourcesFileErrors"})}),(0,a.jsx)(s.p,{children:(0,a.jsx)(s.em,{children:"The details of all errors produced by a re
1cipe run."})}),(0,a.jsxs)(s.table,{children:[(0,a.jsx)(s.thead,{children:(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.th,{children:"Column Name"}),(0,a.jsx)(s.th,{children:"Description"})]})}),(0,a.jsxs)(s.tbody,{children:[(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Source path"}),(0,a.jsx)(s.td,{children:"The file that failed to parse."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Recipe that made changes"}),(0,a.jsx)(s.td,{children:"The specific recipe that made a change."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Stack trace"}),(0,a.jsx)(s.td,{children:"The stack trace of the failure."})]})]})]})]}),(0,a.jsxs)(n.A,{value:"org.openrewrite.table.RecipeRunStats",label:"RecipeRunStats",children:[(0,a.jsx)(s.h3,{id:"recipe-performance",children:"Recipe performance"}),(0,a.jsx)(s.p,{children:(0,a.jsx)(s.strong,{children:"org.openrewrite.table.RecipeRunStats"})}),(0,a.jsx)(s.p,{children:(0,a.jsx)(s.em,{children:"Statistics used in analyzing the performance of recipes."})}),(0,a.jsxs)(s.table,{children:[(0,a.jsx)(s.thead,{children:(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.th,{children:"Column Name"}),(0,a.jsx)(s.th,{children:"Description"})]})}),(0,a.jsxs)(s.tbody,{children:[(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"The recipe"}),(0,a.jsx)(s.td,{children:"The recipe whose stats are being measured both individually and cumulatively."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Source file count"}),(0,a.jsx)(s.td,{children:"The number of source files the recipe ran over."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Source file changed count"}),(0,a.jsx)(s.td,{children:"The number of source files which were changed in the recipe run. Includes files created, deleted, and edited."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Cumulative scanning time (ns)"}),(0,a.jsx)(s.td,{children:"The total time spent across the scanning phase of this recipe."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Max scanning time (ns)"}),(0,a.jsx)(s.td,{children:"The max time scanning any one source file."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Cumulative edit time (ns)"}),(0,a.jsx)(s.td,{children:"The total time spent across the editing phase of this recipe."})]}),(0,a.jsxs)(s.tr,{children:[(0,a.jsx)(s.td,{children:"Max edit time (ns)"}),(0,a.jsx)(s.td,{children:"The max time editing any one source file."})]})]})]})]})]})]})}function x(e={}){let{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,a.jsx)(s,{...e,children:(0,a.jsx)(j,{...e})}):j(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.