File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
app/src/test/java/com/diffplug/spotless/cli/steps
testlib/src/main/java/com/diffplug/spotless Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ void itRemovesUnusedImportsWithDefaultEngine() {
3131
3232 assertFile ("Java.java" )
3333 .notSameSasResource ("java/removeunusedimports/JavaCodeWithLicensePackageUnformatted.test" )
34- .hasNotContent ("Unused" );
34+ .notHasContent ("Unused" );
3535
3636 selfie ().expectResource ("Java.java" ).toMatchDisk ();
3737 }
@@ -48,7 +48,7 @@ void itRemovesWithExplicitDefaultEngine() {
4848
4949 assertFile ("Java.java" )
5050 .notSameSasResource ("java/removeunusedimports/JavaCodeWithLicensePackageUnformatted.test" )
51- .hasNotContent ("Unused" );
51+ .notHasContent ("Unused" );
5252
5353 selfie ().expectResource ("Java.java" ).toMatchDisk ();
5454 }
@@ -65,7 +65,7 @@ void itRemovesWithExplicitCleanThatEngine() {
6565
6666 assertFile ("Java.java" )
6767 .notSameSasResource ("java/removeunusedimports/JavaCodeWithLicensePackageUnformatted.test" )
68- .hasNotContent ("Unused" );
68+ .notHasContent ("Unused" );
6969
7070 selfie ().expectResource ("Java.java" ).toMatchDisk ();
7171 }
Original file line number Diff line number Diff line change @@ -205,15 +205,15 @@ public ReadAsserter hasContent(String expected) {
205205 return hasContent (expected , StandardCharsets .UTF_8 );
206206 }
207207
208- public ReadAsserter hasNotContent (String notExpected ) {
209- return notHasContent (notExpected , StandardCharsets .UTF_8 );
210- }
211-
212208 public ReadAsserter hasContent (String expected , Charset charset ) {
213209 assertThat (file ).usingCharset (charset ).hasContent (expected );
214210 return this ;
215211 }
216212
213+ public ReadAsserter notHasContent (String notExpected ) {
214+ return notHasContent (notExpected , StandardCharsets .UTF_8 );
215+ }
216+
217217 public ReadAsserter notHasContent (String notExpected , Charset charset ) {
218218 assertThat (file ).usingCharset (charset ).content ().isNotEqualTo (notExpected );
219219 return this ;
@@ -228,7 +228,7 @@ public ReadAsserter sameAsResource(String resource) {
228228 }
229229
230230 public ReadAsserter notSameSasResource (String resource ) {
231- return hasNotContent (getTestResource (resource ));
231+ return notHasContent (getTestResource (resource ));
232232 }
233233
234234 public ReadAsserter matches (Consumer <AbstractCharSequenceAssert <?, String >> conditions ) throws IOException {
You can’t perform that action at this time.
0 commit comments