瀏覽代碼

Reset Death Certificate Converter Tests

Andrew Grant 4 月之前
父節點
當前提交
002e286363

+ 0 - 58
src/test/java/scot/carricksoftware/grants/converters/certificates/deathcertificates/command/DeathCertificateConverterPersonTest.java

@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
- *
- */
-
-package scot.carricksoftware.grants.converters.certificates.deathcertificates.command;
-
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateConverter;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateConverterImpl;
-import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
-import scot.carricksoftware.grants.domains.people.Person;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
-import static scot.carricksoftware.grants.GenerateRandomPeopleValues.GetRandomPerson;
-
-class DeathCertificateConverterPersonTest {
-
-    private DeathCertificateConverter converter;
-
-    @BeforeEach
-    void setUp() {
-        converter = new DeathCertificateConverterImpl();
-    }
-
-    @Test
-    void convertTest() {
-        Long id = GetRandomLong();
-        Person person = GetRandomPerson();
-        Person father = GetRandomPerson();
-        Person informant = GetRandomPerson();
-        Person mother = GetRandomPerson();
-        Person spouse = GetRandomPerson();
-
-        DeathCertificate source = new DeathCertificate();
-
-        source.setId(id);
-        source.setDeceased(person);
-        source.setFather(father);
-        source.setInformant(informant);
-        source.setMother(mother);
-        source.setSpouse(spouse);
-
-        DeathCertificateCommand target = converter.convert(source);
-
-        assert target != null;
-        assertEquals(id,target.getId());
-        assertEquals(person,target.getDeceased());
-        assertEquals(father,target.getFather());
-        assertEquals(informant,target.getInformant());
-        assertEquals(mother,target.getMother());
-        assertEquals(spouse,target.getSpouse());
-    }
-}

+ 0 - 47
src/test/java/scot/carricksoftware/grants/converters/certificates/deathcertificates/command/DeathCertificateConverterPlaceTest.java

@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
- *
- */
-
-package scot.carricksoftware.grants.converters.certificates.deathcertificates.command;
-
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateConverter;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateConverterImpl;
-import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
-import scot.carricksoftware.grants.domains.places.Place;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
-
-class DeathCertificateConverterPlaceTest {
-
-    private DeathCertificateConverter converter;
-
-    @BeforeEach
-    void setUp() {
-        converter = new DeathCertificateConverterImpl();
-    }
-
-    @Test
-    void convertTest() {
-        Place usualResidence = GetRandomPlace();
-        Place whereDied = GetRandomPlace();
-
-        DeathCertificate source = new DeathCertificate();
-
-        source.setUsualResidence(usualResidence);
-        source.setWhereDied(whereDied);
-
-        DeathCertificateCommand target = converter.convert(source);
-
-        assert target != null;
-
-        assertEquals(usualResidence,target.getUsualResidence());
-        assertEquals(whereDied,target.getWhereDied());
-
-    }
-}

+ 0 - 45
src/test/java/scot/carricksoftware/grants/converters/certificates/deathcertificates/command/DeathCertificateConverterSexTest.java

@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
- *
- */
-
-package scot.carricksoftware.grants.converters.certificates.deathcertificates.command;
-
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateConverter;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateConverterImpl;
-import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
-import scot.carricksoftware.grants.enums.general.Sex;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-class DeathCertificateConverterSexTest {
-
-    private DeathCertificateConverter converter;
-
-    @BeforeEach
-    void setUp() {
-        converter = new DeathCertificateConverterImpl();
-    }
-
-    @Test
-    void convertTest() {
-
-        Sex sex = Sex.MALE;
-
-        DeathCertificate source = new DeathCertificate();
-
-        source.setSex(sex);
-
-        DeathCertificateCommand target = converter.convert(source);
-
-        assert target != null;
-
-        assertEquals(sex,target.getSex());
-
-        
-    }
-}

+ 0 - 97
src/test/java/scot/carricksoftware/grants/converters/certificates/deathcertificates/command/DeathCertificateConverterStringTest.java

@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
- *
- */
-
-package scot.carricksoftware.grants.converters.certificates.deathcertificates.command;
-
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateConverter;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateConverterImpl;
-import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
-
-class DeathCertificateConverterStringTest {
-
-    private DeathCertificateConverter converter;
-
-    @BeforeEach
-    void setUp() {
-        converter = new DeathCertificateConverterImpl();
-    }
-
-    @Test
-    void convertTest() {
-        String age = GetRandomString();
-        String causeOfDeath = GetRandomString();
-        String fatherOccupation = GetRandomString();
-        String informantAddress = GetRandomString();
-        String informantQualification = GetRandomString();
-        String maritalStatus = GetRandomString();
-        String motherOccupation = GetRandomString();
-        String occupation  = GetRandomString();
-        String spouseOccupation = GetRandomString();
-        String untrackedFather = GetRandomString();
-        String untrackedInformant = GetRandomString();
-        String untrackedMother = GetRandomString();
-        String untrackedSpouse = GetRandomString();
-        String untrackedUsualResidence = GetRandomString();
-        String untrackedWhereDied = GetRandomString();
-        String whenBorn = GetRandomString();
-        String whenDied = GetRandomString();
-        String whenRegistered = GetRandomString();
-        String whereRegistered = GetRandomString();
-        
-        DeathCertificate source = new DeathCertificate();
-
-        source.setAge(age);
-        source.setCauseOfDeath(causeOfDeath);
-        source.setFatherOccupation(fatherOccupation);
-        source.setInformantAddress(informantAddress);
-        source.setInformantQualification(informantQualification);
-        source.setMaritalStatus(maritalStatus);
-        source.setMotherOccupation(motherOccupation);
-        source.setOccupation(occupation);
-        source.setSpouseOccupation(spouseOccupation);
-        source.setUntrackedFather(untrackedFather);
-        source.setUntrackedInformant(untrackedInformant);
-        source.setUntrackedMother(untrackedMother);
-        source.setUntrackedSpouse(untrackedSpouse);
-        source.setUntrackedUsualResidence(untrackedUsualResidence);
-        source.setUntrackedWhereDied(untrackedWhereDied);
-        source.setWhenBorn(whenBorn);
-        source.setWhenDied(whenDied);
-        source.setWhenRegistered(whenRegistered);
-        source.setWhereRegistered(whereRegistered);
-        
-        DeathCertificateCommand target = converter.convert(source);
-
-        assert target != null;
-
-        assertEquals(age,target.getAge());
-        assertEquals(causeOfDeath,target.getCauseOfDeath());
-        assertEquals(fatherOccupation,target.getFatherOccupation());
-        assertEquals(informantAddress,target.getInformantAddress());
-        assertEquals(informantQualification,target.getInformantQualification());
-        assertEquals(maritalStatus,target.getMaritalStatus());
-        assertEquals(motherOccupation,target.getMotherOccupation());
-        assertEquals(occupation,target.getOccupation());
-        assertEquals(spouseOccupation,target.getSpouseOccupation());
-        assertEquals(untrackedFather,target.getUntrackedFather());
-        assertEquals(untrackedInformant,target.getUntrackedInformant());
-        assertEquals(untrackedMother,target.getUntrackedMother());
-        assertEquals(untrackedSpouse,target.getUntrackedSpouse());
-        assertEquals(untrackedUsualResidence,target.getUntrackedUsualResidence());
-        assertEquals(untrackedWhereDied,target.getUntrackedWhereDied());
-        assertEquals(whenBorn,target.getWhenBorn());
-        assertEquals(whenDied,target.getWhenDied());
-        assertEquals(whenRegistered,target.getWhenRegistered());
-        assertEquals(whereRegistered,target.getWhereRegistered());
-        
-    }
-}

+ 0 - 44
src/test/java/scot/carricksoftware/grants/converters/certificates/deathcertificates/domain/DeathCertificateCommandConverterLongTest.java

@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
- *
- */
-
-package scot.carricksoftware.grants.converters.certificates.deathcertificates.domain;
-
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommandImpl;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverter;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverterImpl;
-import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
-
-class DeathCertificateCommandConverterLongTest {
-
-    private DeathCertificateCommandConverter converter;
-
-    @BeforeEach
-    void setUp() {
-        converter = new DeathCertificateCommandConverterImpl();
-    }
-
-    @Test
-    void convertTest() {
-        Long id = GetRandomLong();
-
-        DeathCertificateCommand source = new DeathCertificateCommandImpl();
-
-        source.setId(id);
-
-        DeathCertificate target = converter.convert(source);
-
-        assert target != null;
-        assertEquals(id,target.getId());
-
-
-    }
-}

+ 0 - 60
src/test/java/scot/carricksoftware/grants/converters/certificates/deathcertificates/domain/DeathCertificateCommandConverterPersonTest.java

@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
- *
- */
-
-package scot.carricksoftware.grants.converters.certificates.deathcertificates.domain;
-
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommandImpl;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverter;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverterImpl;
-import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
-import scot.carricksoftware.grants.domains.people.Person;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
-import static scot.carricksoftware.grants.GenerateRandomPeopleValues.GetRandomPerson;
-
-class DeathCertificateCommandConverterPersonTest {
-
-    private DeathCertificateCommandConverter converter;
-
-    @BeforeEach
-    void setUp() {
-        converter = new DeathCertificateCommandConverterImpl();
-    }
-
-    @Test
-    void convertTest() {
-        Long id = GetRandomLong();
-        Person person = GetRandomPerson();
-        Person father = GetRandomPerson();
-        Person informant = GetRandomPerson();
-        Person mother = GetRandomPerson();
-        Person spouse = GetRandomPerson();
-
-        DeathCertificateCommand source = new DeathCertificateCommandImpl();
-
-        source.setId(id);
-        source.setDeceased(person);
-        source.setFather(father);
-        source.setInformant(informant);
-        source.setMother(mother);
-        source.setSpouse(spouse);
-
-        DeathCertificate target = converter.convert(source);
-
-        assert target != null;
-        assertEquals(id,target.getId());
-        assertEquals(person,target.getDeceased());
-        assertEquals(father,target.getFather());
-        assertEquals(informant,target.getInformant());
-        assertEquals(mother,target.getMother());
-        assertEquals(spouse,target.getSpouse());
-
-    }
-}

+ 0 - 48
src/test/java/scot/carricksoftware/grants/converters/certificates/deathcertificates/domain/DeathCertificateCommandConverterPlaceTest.java

@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
- *
- */
-
-package scot.carricksoftware.grants.converters.certificates.deathcertificates.domain;
-
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommandImpl;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverter;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverterImpl;
-import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
-import scot.carricksoftware.grants.domains.places.Place;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
-
-class DeathCertificateCommandConverterPlaceTest {
-
-    private DeathCertificateCommandConverter converter;
-
-    @BeforeEach
-    void setUp() {
-        converter = new DeathCertificateCommandConverterImpl();
-    }
-
-    @Test
-    void convertTest() {
-        Place usualResidence = GetRandomPlace();
-        Place whereDied = GetRandomPlace();
-
-        DeathCertificateCommand source = new DeathCertificateCommandImpl();
-
-        source.setUsualResidence(usualResidence);
-        source.setWhereDied(whereDied);
-
-        DeathCertificate target = converter.convert(source);
-
-        assert target != null;
-
-        assertEquals(usualResidence,target.getUsualResidence());
-        assertEquals(whereDied,target.getWhereDied());
-
-    }
-}

+ 0 - 46
src/test/java/scot/carricksoftware/grants/converters/certificates/deathcertificates/domain/DeathCertificateCommandConverterSexTest.java

@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
- *
- */
-
-package scot.carricksoftware.grants.converters.certificates.deathcertificates.domain;
-
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommandImpl;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverter;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverterImpl;
-import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
-import scot.carricksoftware.grants.enums.general.Sex;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-class DeathCertificateCommandConverterSexTest {
-
-    private DeathCertificateCommandConverter converter;
-
-    @BeforeEach
-    void setUp() {
-        converter = new DeathCertificateCommandConverterImpl();
-    }
-
-    @Test
-    void convertTest() {
-
-        Sex sex = Sex.MALE;
-
-        DeathCertificateCommand source = new DeathCertificateCommandImpl();
-
-        source.setSex(sex);
-
-        DeathCertificate target = converter.convert(source);
-
-        assert target != null;
-
-        assertEquals(sex,target.getSex());
-
-        
-    }
-}

+ 0 - 98
src/test/java/scot/carricksoftware/grants/converters/certificates/deathcertificates/domain/DeathCertificateCommandConverterStringTest.java

@@ -1,98 +0,0 @@
-/*
- * Copyright (c) 2025.  Andrew Grant Carrick Software. All rights reserved
- *
- */
-
-package scot.carricksoftware.grants.converters.certificates.deathcertificates.domain;
-
-
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Test;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommand;
-import scot.carricksoftware.grants.commands.certificates.deathcertificates.DeathCertificateCommandImpl;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverter;
-import scot.carricksoftware.grants.converters.certificates.deathcertificates.DeathCertificateCommandConverterImpl;
-import scot.carricksoftware.grants.domains.certificates.DeathCertificate;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
-
-class DeathCertificateCommandConverterStringTest {
-
-    private DeathCertificateCommandConverter converter;
-
-    @BeforeEach
-    void setUp() {
-        converter = new DeathCertificateCommandConverterImpl();
-    }
-
-    @Test
-    void convertTest() {
-        String age = GetRandomString();
-        String causeOfDeath = GetRandomString();
-        String fatherOccupation = GetRandomString();
-        String informantAddress = GetRandomString();
-        String informantQualification = GetRandomString();
-        String maritalStatus = GetRandomString();
-        String motherOccupation = GetRandomString();
-        String occupation  = GetRandomString();
-        String spouseOccupation = GetRandomString();
-        String untrackedFather = GetRandomString();
-        String untrackedInformant = GetRandomString();
-        String untrackedMother = GetRandomString();
-        String untrackedSpouse = GetRandomString();
-        String untrackedUsualResidence = GetRandomString();
-        String untrackedWhereDied = GetRandomString();
-        String whenBorn = GetRandomString();
-        String whenDied = GetRandomString();
-        String whenRegistered = GetRandomString();
-        String whereRegistered = GetRandomString();
-        
-        DeathCertificateCommand source = new DeathCertificateCommandImpl();
-
-        source.setAge(age);
-        source.setCauseOfDeath(causeOfDeath);
-        source.setFatherOccupation(fatherOccupation);
-        source.setInformantAddress(informantAddress);
-        source.setInformantQualification(informantQualification);
-        source.setMaritalStatus(maritalStatus);
-        source.setMotherOccupation(motherOccupation);
-        source.setOccupation(occupation);
-        source.setSpouseOccupation(spouseOccupation);
-        source.setUntrackedFather(untrackedFather);
-        source.setUntrackedInformant(untrackedInformant);
-        source.setUntrackedMother(untrackedMother);
-        source.setUntrackedSpouse(untrackedSpouse);
-        source.setUntrackedUsualResidence(untrackedUsualResidence);
-        source.setUntrackedWhereDied(untrackedWhereDied);
-        source.setWhenBorn(whenBorn);
-        source.setWhenDied(whenDied);
-        source.setWhenRegistered(whenRegistered);
-        source.setWhereRegistered(whereRegistered);
-        
-        DeathCertificate target = converter.convert(source);
-
-        assert target != null;
-
-        assertEquals(age,target.getAge());
-        assertEquals(causeOfDeath,target.getCauseOfDeath());
-        assertEquals(fatherOccupation,target.getFatherOccupation());
-        assertEquals(informantAddress,target.getInformantAddress());
-        assertEquals(informantQualification,target.getInformantQualification());
-        assertEquals(maritalStatus,target.getMaritalStatus());
-        assertEquals(motherOccupation,target.getMotherOccupation());
-        assertEquals(occupation,target.getOccupation());
-        assertEquals(spouseOccupation,target.getSpouseOccupation());
-        assertEquals(untrackedFather,target.getUntrackedFather());
-        assertEquals(untrackedInformant,target.getUntrackedInformant());
-        assertEquals(untrackedMother,target.getUntrackedMother());
-        assertEquals(untrackedSpouse,target.getUntrackedSpouse());
-        assertEquals(untrackedUsualResidence,target.getUntrackedUsualResidence());
-        assertEquals(untrackedWhereDied,target.getUntrackedWhereDied());
-        assertEquals(whenBorn,target.getWhenBorn());
-        assertEquals(whenDied,target.getWhenDied());
-        assertEquals(whenRegistered,target.getWhenRegistered());
-        assertEquals(whereRegistered,target.getWhereRegistered());
-        
-    }
-}