-
Notifications
You must be signed in to change notification settings - Fork 224
Expand file tree
/
Copy pathRoleOptionsTests.java
More file actions
57 lines (50 loc) · 2.41 KB
/
RoleOptionsTests.java
File metadata and controls
57 lines (50 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.bettercloud.vault.api.pki;
import org.junit.Assert;
import org.junit.Test;
import java.util.ArrayList;
public class RoleOptionsTests {
@Test
public void RoleOptionsTests() {
RoleOptions roleOptions = new RoleOptions();
Assert.assertNotNull(roleOptions);
Assert.assertNull(roleOptions.getAllowedDomains());
roleOptions.allowAnyName(true);
roleOptions.allowBareDomains(true);
roleOptions.allowedDomains(new ArrayList<>());
roleOptions.allowIpSans(true);
roleOptions.allowLocalhost(true);
roleOptions.allowSpiffeName(true);
roleOptions.allowSubdomains(true);
roleOptions.clientFlag(true);
roleOptions.codeSigningFlag(true);
roleOptions.emailProtectionFlag(true);
roleOptions.enforceHostnames(true);
roleOptions.ttl("ttl");
roleOptions.maxTtl("maxTtl");
roleOptions.keyUsage(new ArrayList<>());
roleOptions.keyBits(1L);
roleOptions.useCsrSans(true);
roleOptions.useCsrCommonName(true);
roleOptions.keyType("keyType");
roleOptions.serverFlag(true);
Assert.assertEquals(roleOptions.getAllowAnyName(), true);
Assert.assertEquals(roleOptions.getAllowBareDomains(), true);
Assert.assertEquals(roleOptions.getAllowedDomains(), new ArrayList<>());
Assert.assertEquals(roleOptions.getAllowIpSans(), true);
Assert.assertEquals(roleOptions.getAllowLocalhost(), true);
Assert.assertEquals(roleOptions.getAllowSpiffename(), true);
Assert.assertEquals(roleOptions.getAllowSubdomains(), true);
Assert.assertEquals(roleOptions.getClientFlag(), true);
Assert.assertEquals(roleOptions.getCodeSigningFlag(), true);
Assert.assertEquals(roleOptions.getEmailProtectionFlag(), true);
Assert.assertEquals(roleOptions.getEnforceHostnames(), true);
Assert.assertEquals(roleOptions.getTtl(), "ttl");
Assert.assertEquals(roleOptions.getMaxTtl(), "maxTtl");
Assert.assertEquals(roleOptions.getKeyUsage(), new ArrayList<>());
Assert.assertEquals(roleOptions.getKeyBits().toString(), String.valueOf(1L));
Assert.assertEquals(roleOptions.getUseCsrSans(), true);
Assert.assertEquals(roleOptions.getUseCsrCommonName(), true);
Assert.assertEquals(roleOptions.getKeyType(), "keyType");
Assert.assertEquals(roleOptions.getServerFlag(), true);
}
}