master
1package main
2
3import (
4 "testing"
5
6 "github.com/stretchr/testify/assert"
7)
8
9func Test_VisitorTypeString(t *testing.T) {
10 r := assert.New(t)
11 visitors := []struct {
12 vType VisitorType
13 vString string
14 }{
15 {CONTRACTOR, "CONTRACTOR"},
16 {MILITARY, "MILITARY"},
17 {CIVILIAN, "CIVILIAN"},
18 }
19 for _, t := range visitors {
20 r.Equal(t.vType.String(), t.vString)
21 }
22}
23
24func Test_AccessTypeString(t *testing.T) {
25 r := assert.New(t)
26 accesses := []struct {
27 aType AccessType
28 aString string
29 }{
30 {UNCLASSIFIED, "UNCLASSIFIED"},
31 {CONFIDENTIAL, "CONFIDENTIAL"},
32 {SECRET, "SECRET"},
33 {TOP_SECRET, "TOP SECRET"},
34 {TOP_SECRET_SCI, "TOP SECRET // SCI"},
35 }
36 for _, t := range accesses {
37 r.Equal(t.aType.String(), t.aString)
38 }
39}