Class PhotoTest


  • class PhotoTest
    extends java.lang.Object
    Test class to upload and delete a photo.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static Photo photo  
      private static User user  
    • Constructor Summary

      Constructors 
      Constructor Description
      PhotoTest()  
    • Method Summary

      Modifier and Type Method Description
      (package private) void add_NewPhoto_True()
      Test to upload a photo.
      (package private) void add_PhotoToNonExistingAlbum_IndexOutOfBoundsExceptionThrown()
      An IndexOutOfBoundsException is expected to be thrown when adding a photo to a non existing album.
      (package private) void getUserId_CorrectPhotoUserID_isEqual()
      Test to check whether the photo was uploaded to the correct user.
      (package private) static void setup()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • photo

        private static Photo photo
      • user

        private static User user
    • Constructor Detail

      • PhotoTest

        PhotoTest()
    • Method Detail

      • setup

        @BeforeAll
        static void setup()
      • add_NewPhoto_True

        @Test
        void add_NewPhoto_True()
        Test to upload a photo.
      • add_PhotoToNonExistingAlbum_IndexOutOfBoundsExceptionThrown

        @Test
        void add_PhotoToNonExistingAlbum_IndexOutOfBoundsExceptionThrown()
        An IndexOutOfBoundsException is expected to be thrown when adding a photo to a non existing album.
      • getUserId_CorrectPhotoUserID_isEqual

        @Test
        void getUserId_CorrectPhotoUserID_isEqual()
        Test to check whether the photo was uploaded to the correct user.