BirthCertificatePlaceTest.java 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. * Copyright (c) 2025. Andrew Grant Carrick Software. All rights reserved
  3. *
  4. */
  5. package scot.carricksoftware.grantswriter.domains.certificates.birthcertificate;
  6. import org.junit.jupiter.api.BeforeEach;
  7. import org.junit.jupiter.api.Test;
  8. import scot.carricksoftware.grantswriter.domains.places.Place;
  9. import static org.junit.jupiter.api.Assertions.assertEquals;
  10. import static org.junit.jupiter.api.Assertions.assertNull;
  11. import static scot.carricksoftware.grantswriter.GenerateCertificateRandomValues.GetRandomString;
  12. import static scot.carricksoftware.grantswriter.GenerateRandomPlaceValues.GetRandomPlace;
  13. class BirthCertificatePlaceTest {
  14. BirthCertificate birthCertificate;
  15. @BeforeEach
  16. void setUp() {
  17. birthCertificate = new BirthCertificate();
  18. }
  19. @Test
  20. void getIDTest() {
  21. assertNull(birthCertificate.getId());
  22. }
  23. @Test
  24. void getWhereBornTest() {
  25. assertNull(birthCertificate.getWhereBorn());
  26. }
  27. @Test
  28. void setWhereBornTest() {
  29. Place whereBorn = GetRandomPlace();
  30. birthCertificate.setWhereBorn(whereBorn);
  31. assertEquals(whereBorn, birthCertificate.getWhereBorn());
  32. }
  33. @Test
  34. void getUntrackedWhereBornTest() {
  35. assertNull(birthCertificate.getUntrackedWhereBorn());
  36. }
  37. @Test
  38. void setUntrackedWhereBornTest() {
  39. String whereBorn = GetRandomString();
  40. birthCertificate.setUntrackedWhereBorn(whereBorn);
  41. assertEquals(whereBorn, birthCertificate.getUntrackedWhereBorn());
  42. }
  43. @Test
  44. void getWhereRegisteredTest() {
  45. assertNull(birthCertificate.getWhereRegistered());
  46. }
  47. @Test
  48. void setWhereRegisteredTest() {
  49. String whereRegistered = GetRandomString();
  50. birthCertificate.setWhereRegistered(whereRegistered);
  51. assertEquals(whereRegistered, birthCertificate.getWhereRegistered());
  52. }
  53. }