feat: Add basic certificate models and repositories #8
2 changed files with 6 additions and 5 deletions
|
@ -1,7 +1,8 @@
|
||||||
package de.mlessmann.certassist.models;
|
package de.mlessmann.certassist.models;
|
||||||
|
|
||||||
public enum CertificateType {
|
public enum CertificateType {
|
||||||
ROOT_AUTHORITY,
|
ROOT_CA,
|
||||||
STANDALONE_CERTIFICATE,
|
STANDALONE_CERT,
|
||||||
NORMAL_CERTIFICATE,
|
SIGNED_CERT,
|
||||||
|
CLIENT_CERT
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ class CertificateRepositoryTest {
|
||||||
private Certificate getCertificate() {
|
private Certificate getCertificate() {
|
||||||
final Certificate certificate = new Certificate();
|
final Certificate certificate = new Certificate();
|
||||||
certificate.setCommonName("test-cn");
|
certificate.setCommonName("test-cn");
|
||||||
certificate.setType(CertificateType.NORMAL_CERTIFICATE);
|
certificate.setType(CertificateType.SIGNED_CERT);
|
||||||
certificate.setRequestedKeyLength(1);
|
certificate.setRequestedKeyLength(1);
|
||||||
certificate.setRequestedValidityDays(1);
|
certificate.setRequestedValidityDays(1);
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class CertificateRepositoryTest {
|
||||||
|
|
||||||
Certificate foundCertificate = repository.findById(certificate.getId()).orElseThrow();
|
Certificate foundCertificate = repository.findById(certificate.getId()).orElseThrow();
|
||||||
assertThat(foundCertificate.getCommonName()).isEqualTo("test-cn");
|
assertThat(foundCertificate.getCommonName()).isEqualTo("test-cn");
|
||||||
assertThat(foundCertificate.getType()).isEqualTo(CertificateType.NORMAL_CERTIFICATE);
|
assertThat(foundCertificate.getType()).isEqualTo(CertificateType.SIGNED_CERT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Add table
Reference in a new issue