Skip to content

Commit

Permalink
Rename isEmpty/isNotEmpty to isEmptyFile/isNotEmptyFile
Browse files Browse the repository at this point in the history
  • Loading branch information
joel-costigliola committed Jan 23, 2021
1 parent 3b85988 commit bb13aac
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions src/main/java/org/assertj/core/api/AbstractPathAssert.java
Original file line number Diff line number Diff line change
Expand Up @@ -1761,22 +1761,22 @@ public SELF isNotEmptyDirectory() {
* /root/sub-dir-1/file-2.ext (content)</code></pre>
*
* Here are some assertions examples:
* <pre><code class="java"> Path no-content-path = Paths.get("/root/sub-dir-1/file-1.ext");
* Path content-path = Paths.get("/root/sub-dir-1/file-2.ext");
* <pre><code class="java"> Path noContentPath = Paths.get("/root/sub-dir-1/file-1.ext");
* Path contentPath = Paths.get("/root/sub-dir-1/file-2.ext");
*
* // The following assertion succeeds:
* assertThat(no-content-path).isEmpty();
* assertThat(noContentPath).isEmptyFile();
*
* // The following assertion fails:
* assertThat(content-path).isEmpty();</code></pre>
* assertThat(contentPath).isEmptyFile();</code></pre>
*
* @return {@code this} assertion object.
* @throws AssertionError if actual is {@code null}.
* @throws AssertionError if actual does not exist.
* @throws AssertionError if actual is not empty.
* @since 3.19.0
*/
public SELF isEmpty() {
public SELF isEmptyFile() {
paths.assertIsEmptyFile(info, actual);
return myself;
}
Expand All @@ -1792,22 +1792,22 @@ public SELF isEmpty() {
* /root/sub-dir-1/file-2.ext (content)</code></pre>
*
* Here are some assertions examples:
* <pre><code class="java"> Path no-content-path = Paths.get("/root/sub-dir-1/file-1.ext");
* Path content-path = Paths.get("/root/sub-dir-1/file-2.ext");
* <pre><code class="java"> Path noContentPath = Paths.get("/root/sub-dir-1/file-1.ext");
* Path contentPath = Paths.get("/root/sub-dir-1/file-2.ext");
*
* // The following assertion succeeds:
* assertThat(content-path).isNotEmpty();
* assertThat(contentPath).isNotEmptyFile();
*
* // The following assertion fails:
* assertThat(no-content-path).isNotEmpty();</code></pre>
* assertThat(noContentPath).isNotEmptyFile();</code></pre>
*
* @return {@code this} assertion object.
* @throws AssertionError if actual is {@code null}.
* @throws AssertionError if actual does not exist.
* @throws AssertionError if actual is empty.
* @since 3.19.0
*/
public SELF isNotEmpty() {
public SELF isNotEmptyFile() {
paths.assertIsNotEmptyFile(info, actual);
return myself;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
import org.junit.jupiter.api.DisplayName;

/**
* Test for <code>{@link PathAssert#isEmpty()}</code>.
* Test for <code>{@link PathAssert#isEmptyFile()}</code>.
*
* @author Omar Morales
*/
@DisplayName("PathAssert isEmpty")
class PathAssert_isEmpty_Test extends PathAssertBaseTest {
@DisplayName("PathAssert isEmptyFile")
class PathAssert_isEmptyFile_Test extends PathAssertBaseTest {

@Override
protected PathAssert invoke_api_method() {
return assertions.isEmpty();
return assertions.isEmptyFile();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
import org.junit.jupiter.api.DisplayName;

/**
* Test for <code>{@link PathAssert#isNotEmpty()}</code>.
* Test for <code>{@link PathAssert#isNotEmptyFile()}</code>.
*
* @author Omar Morales
*/
@DisplayName("PathAssert isNotEmpty")
class PathAssert_isNotEmpty_Test extends PathAssertBaseTest {
@DisplayName("PathAssert isNotEmptyFile")
class PathAssert_isNotEmptyFile_Test extends PathAssertBaseTest {

@Override
protected PathAssert invoke_api_method() {
return assertions.isNotEmpty();
return assertions.isNotEmptyFile();
}

@Override
Expand Down

0 comments on commit bb13aac

Please sign in to comment.