MCPcopy Create free account
hub / github.com/auth0/auth0-cli / TestArgumentGetters

Function TestArgumentGetters

internal/cli/arguments_test.go:9–41  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestArgumentGetters(t *testing.T) {
10 t.Run("returns the name", func(t *testing.T) {
11 argument := Argument{Name: "Foo"}
12 want := "Foo"
13 got := argument.GetName()
14
15 assert.Equal(t, want, got)
16 })
17
18 t.Run("returns the label", func(t *testing.T) {
19 argument := Argument{Name: "Foo"}
20 want := "Foo:"
21 got := argument.GetLabel()
22
23 assert.Equal(t, want, got)
24 })
25
26 t.Run("returns the help", func(t *testing.T) {
27 argument := Argument{Help: "Foo"}
28 want := "Foo"
29 got := argument.GetHelp()
30
31 assert.Equal(t, want, got)
32 })
33
34 t.Run("returns that the argument is required", func(t *testing.T) {
35 argument := Argument{}
36 want := true
37 got := argument.GetIsRequired()
38
39 assert.Equal(t, want, got)
40 })
41}

Callers

nothing calls this directly

Calls 4

GetNameMethod · 0.95
GetLabelMethod · 0.95
GetHelpMethod · 0.95
GetIsRequiredMethod · 0.95

Tested by

no test coverage detected