Class ImageAnalyzerTest


  • class ImageAnalyzerTest
    extends java.lang.Object
    Class for testing of ImageAnalyzer class
    • Field Detail

      • user

        private static User user
      • photo

        private static Photo photo
    • Constructor Detail

      • ImageAnalyzerTest

        ImageAnalyzerTest()
    • Method Detail

      • setup

        @BeforeAll
        static void setup()
      • analyse_PhotoExist_NotNull

        @Test
        void analyse_PhotoExist_NotNull()
        Test to check if the photo object is not null.
      • getTitle_CorrectPhotoTitle_isEqual

        @Test
        void getTitle_CorrectPhotoTitle_isEqual()
        Check if the title of the photo is valid.
      • getUrl_CorrectUrl_isEqual

        @Test
        void getUrl_CorrectUrl_isEqual()
        Check if the photo was initialized with the correct url.
      • getTime_ValidTime_NotNull

        @Test
        void getTime_ValidTime_NotNull()
      • getCamera_ValidCamera_NotNull

        @Test
        void getCamera_ValidCamera_NotNull()
      • getExposureTime_ValidPhotoExposureTime_NotNull

        @Test
        void getExposureTime_ValidPhotoExposureTime_NotNull()
      • getAperture_ValidPhotoApertureTime_NotNull

        @Test
        void getAperture_ValidPhotoApertureTime_NotNull()
      • getHeight_PhotoHeightNotNull_isNotEqual

        @Test
        void getHeight_PhotoHeightNotNull_isNotEqual()
      • getWidth_PhotoWidthNotNull_isNotEqual

        @Test
        void getWidth_PhotoWidthNotNull_isNotEqual()
      • getFileSize_PhotoFileSizeNotNull_isNotEqual

        @Test
        void getFileSize_PhotoFileSizeNotNull_isNotEqual()
      • getFileType_ValidPhotoFileType_NotNull

        @Test
        void getFileType_ValidPhotoFileType_NotNull()
      • getID_CorrectPhotoUserID_IsEqual

        @Test
        void getID_CorrectPhotoUserID_IsEqual()
      • analyze_TitleAndUrlIsNull_IOExceptionThrown

        @Test
        void analyze_TitleAndUrlIsNull_IOExceptionThrown()
        Tests that analyze-method throws IOException when we pass null and null as arguments.