MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / TestNotEquals

Function TestNotEquals

pkg/validation/validation_test.go:10–26  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestNotEquals(t *testing.T) {
11 testStrings := []string{"foo", "bar", "quxx"}
12 errorMessage := "this is an error"
13 notEqualsValidator := NotEquals(testStrings, errorMessage)
14
15 assert.NotNil(t, notEqualsValidator)
16
17 for _, v := range testStrings {
18 err := notEqualsValidator(v)
19 assert.Error(t, err)
20 assert.Equal(t, err.Error(), errorMessage)
21 }
22
23 test := "xyzzy"
24 err := notEqualsValidator(test)
25 assert.NoError(t, err)
26}
27
28func TestIsUUID(t *testing.T) {
29 testStrings := []string{"foo", "bar", "quxx"}

Callers

nothing calls this directly

Calls 2

NotEqualsFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected