Adjust cert enum

This commit is contained in:
Torge Hamann 2024-11-17 22:31:15 +01:00
parent 5e30337086
commit a2ced3533a
2 changed files with 6 additions and 5 deletions

View file

@ -1,7 +1,8 @@
package de.mlessmann.certassist.models;
public enum CertificateType {
ROOT_AUTHORITY,
STANDALONE_CERTIFICATE,
NORMAL_CERTIFICATE,
ROOT_CA,
STANDALONE_CERT,
SIGNED_CERT,
CLIENT_CERT
}

View file

@ -23,7 +23,7 @@ class CertificateRepositoryTest {
private Certificate getCertificate() {
final Certificate certificate = new Certificate();
certificate.setCommonName("test-cn");
certificate.setType(CertificateType.NORMAL_CERTIFICATE);
certificate.setType(CertificateType.SIGNED_CERT);
certificate.setRequestedKeyLength(1);
certificate.setRequestedValidityDays(1);
@ -38,7 +38,7 @@ class CertificateRepositoryTest {
Certificate foundCertificate = repository.findById(certificate.getId()).orElseThrow();
assertThat(foundCertificate.getCommonName()).isEqualTo("test-cn");
assertThat(foundCertificate.getType()).isEqualTo(CertificateType.NORMAL_CERTIFICATE);
assertThat(foundCertificate.getType()).isEqualTo(CertificateType.SIGNED_CERT);
}
@Test