Create initial version of new package status

This commit is contained in:
Daniel
2018-08-14 17:09:18 +02:00
parent bdeddc41f9
commit 9cb0641f19
7 changed files with 258 additions and 0 deletions

36
status/status_test.go Normal file
View File

@@ -0,0 +1,36 @@
package status
import "testing"
func TestStatus(t *testing.T) {
SetCurrentSecurityLevel(SecurityLevelOff)
SetSelectedSecurityLevel(SecurityLevelOff)
if FmtSecurityLevel() != "Off" {
t.Error("unexpected string representation")
}
SetCurrentSecurityLevel(SecurityLevelDynamic)
SetSelectedSecurityLevel(SecurityLevelDynamic)
if FmtSecurityLevel() != "Dynamic" {
t.Error("unexpected string representation")
}
SetCurrentSecurityLevel(SecurityLevelSecure)
SetSelectedSecurityLevel(SecurityLevelSecure)
if FmtSecurityLevel() != "Secure" {
t.Error("unexpected string representation")
}
SetCurrentSecurityLevel(SecurityLevelFortress)
SetSelectedSecurityLevel(SecurityLevelFortress)
if FmtSecurityLevel() != "Fortress" {
t.Error("unexpected string representation")
}
SetSelectedSecurityLevel(SecurityLevelDynamic)
if FmtSecurityLevel() != "Fortress*" {
t.Error("unexpected string representation")
}
}