/*
 * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
 *
 */

package scot.carricksoftware.grants.domains.certificates.birth;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import scot.carricksoftware.grants.domains.certificates.BirthCertificate;
import scot.carricksoftware.grants.enums.general.Sex;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
import static scot.carricksoftware.grants.GenerateCensusEntryRandomEnums.GetRandomCensusEntrySex;
import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;

class BirthCertificatePartTwoTest {

    private BirthCertificate certificate;

    @BeforeEach
    void setUp() {
        certificate = new BirthCertificate();
    }

    @Test
    public void getWhenBornTest() {
        assertNull(certificate.getWhenBorn());
    }

    @Test
    public void setWhenBornTest() {
        String string;
        certificate.setWhenBorn(string = GetRandomString());
        assertEquals(string, certificate.getWhenBorn());
    }

    @Test
    public void getUntrackedWhereBornTest() {
        assertNull(certificate.getUntrackedWhereBorn());
    }

    @Test
    public void setUntrackedWhereBornTest() {
        String string;
        certificate.setUntrackedWhereBorn(string = GetRandomString());
        assertEquals(string, certificate.getUntrackedWhereBorn());
    }

    @Test
    public void getSexTest() {
        assertNull(certificate.getWhenBorn());
    }

    @Test
    void setSexTest() {
        Sex sex = GetRandomCensusEntrySex();
        certificate.setSex(sex);
        assertEquals(sex, certificate.getSex());
    }

    @Test
    public void getInformantResidenceTest() {
        assertNull(certificate.getInformantResidence());
    }

    @Test
    void setInformantResidenceTest() {
        String informantResidence = GetRandomString();
        certificate.setInformantResidence(informantResidence);
        assertEquals(informantResidence, certificate.getInformantResidence());
    }

}