use of com.stnetix.ariaddna.persistence.entities.Certificate in project ariADDna by StnetixDevTeam.
the class CertificateTransformerTest method certificateEntityToDTOTest.
@Test
public void certificateEntityToDTOTest() throws Exception {
Certificate certificate = new Certificate();
UUID uuid = UUID.randomUUID();
certificate.setId(1L);
certificate.setUuid(uuid.toString());
certificate.setActive(true);
CertificateDTO certificateDTO = transformer.certificateEntityToDTO(certificate);
assertNotEquals(certificateDTO, certificate);
assertEquals(certificate.getUuid(), certificateDTO.getUuid());
assertEquals(certificate.getId(), certificateDTO.getId());
assertEquals(certificate.getActive(), certificateDTO.getActive());
}
use of com.stnetix.ariaddna.persistence.entities.Certificate in project ariADDna by StnetixDevTeam.
the class CertificateTransformerTest method certificateDTOToEntityTest.
@Test
public void certificateDTOToEntityTest() throws Exception {
CertificateDTO certificateDTO = new CertificateDTO();
UUID uuid = UUID.randomUUID();
certificateDTO.setId(1L);
certificateDTO.setUuid(uuid.toString());
certificateDTO.setActive(true);
Certificate certificate = transformer.certificateDTOToEntity(certificateDTO);
assertNotEquals(certificate, certificateDTO);
assertEquals(certificate.getUuid(), certificateDTO.getUuid());
assertEquals(certificate.getId(), certificateDTO.getId());
assertEquals(certificate.getActive(), certificateDTO.getActive());
}
use of com.stnetix.ariaddna.persistence.entities.Certificate in project ariADDna by StnetixDevTeam.
the class CertificateServiceImpl method remove.
@Override
public void remove(CertificateDTO certificateDTO) {
Certificate certificate = tranformer.certificateDTOToEntity(certificateDTO);
repository.delete(certificate);
}
Aggregations