Class PathAssert

  • All Implemented Interfaces:
    org.assertj.core.api.Assert<PathAssert,​Path>, org.assertj.core.api.ComparableAssert<PathAssert,​Path>, org.assertj.core.api.Descriptable<PathAssert>, org.assertj.core.api.EnumerableAssert<PathAssert,​Path>, org.assertj.core.api.ExtensionPoints<PathAssert,​Path>, org.assertj.core.api.ObjectEnumerableAssert<PathAssert,​Path>

    public class PathAssert
    extends org.assertj.core.api.AbstractIterableAssert<PathAssert,​Path,​Path>
    implements org.assertj.core.api.ComparableAssert<PathAssert,​Path>

    Assertions for Path.

    Since:
    2017.2
    Author:
    Andrey Shcheglov <mailto:andrey.shcheglov@jetbrains.com>
    • Field Summary

      • Fields inherited from class org.assertj.core.api.AbstractAssert

        actual, info, myself
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PathAssert​(Path actual)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      PathAssert isDirectory()
      Verifies that the actual Path is an existing directory.
      PathAssert isEmptyDirectory()
      Asserts that the given path is an existing empty directory.
      PathAssert isGreaterThan​(Path other)
      PathAssert isGreaterThanOrEqualTo​(Path other)
      PathAssert isLessThan​(Path other)
      PathAssert isLessThanOrEqualTo​(Path other)
      • Methods inherited from class org.assertj.core.api.AbstractIterableAssert

        are, areAtLeast, areAtLeastOne, areAtMost, areExactly, areNot, contains, containsAll, containsExactly, containsExactlyElementsOf, containsNull, containsOnly, containsOnlyElementsOf, containsOnlyOnce, containsSequence, containsSubsequence, doesNotContain, doesNotContainAnyElementsOf, doesNotContainNull, doesNotHaveDuplicates, doNotHave, endsWith, extracting, extracting, extracting, extracting, extractingResultOf, extractingResultOf, flatExtracting, hasAtLeastOneElementOfType, hasOnlyElementsOfType, hasSameElementsAs, hasSameSizeAs, hasSameSizeAs, hasSize, have, haveAtLeast, haveAtLeastOne, haveAtMost, haveExactly, inBinary, inHexadecimal, isEmpty, isNotEmpty, isNullOrEmpty, isSubsetOf, startsWith, usingComparisonStrategy, usingDefaultElementComparator, usingElementComparator, usingElementComparatorIgnoringFields, usingElementComparatorOnFields, usingFieldByFieldElementComparator
      • Methods inherited from class org.assertj.core.api.AbstractAssert

        as, as, describedAs, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, equals, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, is, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, overridingErrorMessage, usingComparator, usingDefaultComparator
    • Constructor Detail

      • PathAssert

        protected PathAssert​(@Nullable
                             Path actual)
    • Method Detail

      • isLessThan

        @NotNull
        public PathAssert isLessThan​(@Nullable
                                     Path other)
        Specified by:
        isLessThan in interface org.assertj.core.api.ComparableAssert<PathAssert,​Path>
        See Also:
        ComparableAssert.isLessThan(Comparable)
      • isLessThanOrEqualTo

        @NotNull
        public PathAssert isLessThanOrEqualTo​(@Nullable
                                              Path other)
        Specified by:
        isLessThanOrEqualTo in interface org.assertj.core.api.ComparableAssert<PathAssert,​Path>
        See Also:
        ComparableAssert.isLessThanOrEqualTo(Comparable)
      • isGreaterThan

        @NotNull
        public PathAssert isGreaterThan​(@Nullable
                                        Path other)
        Specified by:
        isGreaterThan in interface org.assertj.core.api.ComparableAssert<PathAssert,​Path>
        See Also:
        ComparableAssert.isGreaterThan(Comparable)
      • isGreaterThanOrEqualTo

        @NotNull
        public PathAssert isGreaterThanOrEqualTo​(@Nullable
                                                 Path other)
        Specified by:
        isGreaterThanOrEqualTo in interface org.assertj.core.api.ComparableAssert<PathAssert,​Path>
        See Also:
        ComparableAssert.isGreaterThanOrEqualTo(Comparable)
      • isDirectory

        @NotNull
        public PathAssert isDirectory()

        Verifies that the actual Path is an existing directory.

        Returns:
        this assertion object.
        Throws:
        AssertionError - if the actual Path is null or not an existing directory.
      • isEmptyDirectory

        @NotNull
        public PathAssert isEmptyDirectory()

        Asserts that the given path is an existing empty directory.

        Returns:
        this assertion object.
        Throws:
        AssertionError - if the actual Path is a non-empty directory, not directory or null.