Class PathSubject


  • public class PathSubject
    extends com.google.common.truth.Subject<PathSubject,​java.nio.file.Path>
    Truth support for validating java.nio.file.Path.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.google.common.truth.Subject

        com.google.common.truth.Subject.Factory<SubjectT extends com.google.common.truth.Subject<SubjectT,​ActualT>,​ActualT extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      PathSubject​(com.google.common.truth.FailureMetadata failureMetadata, java.nio.file.Path subject)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static PathSubject assertThat​(java.io.File file)  
      static PathSubject assertThat​(java.nio.file.Path path)  
      void doesNotExist()  
      void exists()  
      void hasContents​(byte[] expectedContents)  
      void hasContents​(java.lang.String... expectedContents)  
      void hasName​(java.lang.String name)  
      void isDirectory()  
      void isExecutable()  
      void isFile()  
      void isNewerThan​(java.nio.file.attribute.FileTime expectedTime)  
      static com.google.common.truth.Subject.Factory<PathSubject,​java.nio.file.Path> paths()  
      void wasModifiedAt​(java.nio.file.attribute.FileTime expectedTime)  
      • Methods inherited from class com.google.common.truth.Subject

        actual, actualAsString, actualCustomStringRepresentation, check, check, equals, fail, fail, fail, failWithActual, failWithActual, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutActual, failWithoutSubject, getSubject, hashCode, ignoreCheck, internalCustomName, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNotSameInstanceAs, isNull, isSameAs, isSameInstanceAs, named, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PathSubject

        public PathSubject​(com.google.common.truth.FailureMetadata failureMetadata,
                           java.nio.file.Path subject)
    • Method Detail

      • paths

        public static com.google.common.truth.Subject.Factory<PathSubject,​java.nio.file.Path> paths()
      • assertThat

        public static PathSubject assertThat​(@Nullable
                                             java.nio.file.Path path)
      • assertThat

        public static PathSubject assertThat​(@Nullable
                                             java.io.File file)
      • hasName

        public void hasName​(java.lang.String name)
      • exists

        public void exists()
      • doesNotExist

        public void doesNotExist()
      • isFile

        public void isFile()
      • isDirectory

        public void isDirectory()
      • isExecutable

        public void isExecutable()
      • hasContents

        public void hasContents​(byte[] expectedContents)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • hasContents

        public void hasContents​(java.lang.String... expectedContents)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • wasModifiedAt

        public void wasModifiedAt​(@NonNull
                                  java.nio.file.attribute.FileTime expectedTime)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • isNewerThan

        public void isNewerThan​(@NonNull
                                java.nio.file.attribute.FileTime expectedTime)
                         throws java.io.IOException
        Throws:
        java.io.IOException