-
Notifications
You must be signed in to change notification settings - Fork 0
/
status_test.go
54 lines (49 loc) · 1.36 KB
/
status_test.go
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
package epplib
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func TestStatusTextExist(t *testing.T) {
t.Parallel()
// Make sure that we have a status text for every code.
codes := []int{
StatusSuccess,
StatusActionPending,
StatusNoMessage,
StatusAckToDequeue,
StatusEndingSession,
StatusUnknownCommand,
StatusCommandSyntaxError,
StatusCommandUseError,
StatusMissingParameter,
StatusValueRangeError,
StatusValueSyntaxError,
StatusUnimplementedProtocolVersion,
StatusUnimplementedCommand,
StatusUnimplementedOption,
StatusUnimplementedExtension,
StatusBillingFailure,
StatusNotEligibleForRenewal,
StatusNotEligibleForTransfer,
StatusAuthenticationError,
StatusAuthorizationError,
StatusInvalidAuthorizationInformation,
StatusObjectPendingTransfer,
StatusObjectNotPendingTransfer,
StatusObjectExists,
StatusObjectDoesNotExist,
StatusObjectStatusProhibitsOperation,
StatusObjectAssociationProhibitsOperation,
StatusParameterPolicyError,
StatusUnimplementedObjectService,
StatusDataManagementPolicyViolation,
StatusCommandFailed,
StatusCommandFailedClosingConnection,
StatusAuthenticationErrorClosingConnection,
StatusSessionLimitExceededClosingConnection,
}
for _, code := range codes {
assert.NotEqual((t), "", StatusText(code), fmt.Sprintf("Code: %d does not have a status text", code))
}
}