ImageTest.java 724 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) Andrew Grant of Carrick Software 28/03/2025, 09:54. All rights reserved.
  3. *
  4. */
  5. package scot.carricksoftware.grantswriter.domains.images;
  6. import org.junit.jupiter.api.BeforeEach;
  7. import org.junit.jupiter.api.Test;
  8. import static org.junit.jupiter.api.Assertions.*;
  9. import static scot.carricksoftware.grantswriter.GenerateRandomNumberValues.GetRandomLong;
  10. class ImageTest {
  11. private Image image;
  12. @BeforeEach
  13. void setUp() {
  14. image = new Image();
  15. }
  16. @Test
  17. public void getIdTest() {
  18. assertNull(image.getId());
  19. }
  20. @Test
  21. public void setIdTest() {
  22. Long id = GetRandomLong();
  23. image.setId(id);
  24. assertEquals(id, image.getId());
  25. }
  26. }