mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
36 lines
962 B
Go
36 lines
962 B
Go
package status
|
|
|
|
import "testing"
|
|
|
|
func TestStatus(t *testing.T) {
|
|
|
|
SetCurrentSecurityLevel(SecurityLevelOff)
|
|
SetSelectedSecurityLevel(SecurityLevelOff)
|
|
if FmtCurrentSecurityLevel() != "Off" {
|
|
t.Error("unexpected string representation")
|
|
}
|
|
|
|
SetCurrentSecurityLevel(SecurityLevelDynamic)
|
|
SetSelectedSecurityLevel(SecurityLevelDynamic)
|
|
if FmtCurrentSecurityLevel() != "Dynamic" {
|
|
t.Error("unexpected string representation")
|
|
}
|
|
|
|
SetCurrentSecurityLevel(SecurityLevelSecure)
|
|
SetSelectedSecurityLevel(SecurityLevelSecure)
|
|
if FmtCurrentSecurityLevel() != "Secure" {
|
|
t.Error("unexpected string representation")
|
|
}
|
|
|
|
SetCurrentSecurityLevel(SecurityLevelFortress)
|
|
SetSelectedSecurityLevel(SecurityLevelFortress)
|
|
if FmtCurrentSecurityLevel() != "Fortress" {
|
|
t.Error("unexpected string representation")
|
|
}
|
|
|
|
SetSelectedSecurityLevel(SecurityLevelDynamic)
|
|
if FmtCurrentSecurityLevel() != "Fortress*" {
|
|
t.Error("unexpected string representation")
|
|
}
|
|
|
|
}
|