PersonImageTest.java 814 B

12345678910111213141516171819202122232425262728293031323334353637
  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.assertEquals;
  9. import static org.junit.jupiter.api.Assertions.assertNull;
  10. import static scot.carricksoftware.grantswriter.GenerateRandomNumberValues.GetRandomLong;
  11. class PersonImageTest {
  12. private PersonImage image;
  13. @BeforeEach
  14. void setUp() {
  15. image = new PersonImage();
  16. }
  17. @Test
  18. public void getIdTest() {
  19. assertNull(image.getId());
  20. }
  21. @Test
  22. public void setIdTest() {
  23. Long id = GetRandomLong();
  24. image.setId(id);
  25. assertEquals(id, image.getId());
  26. }
  27. }