(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func 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 | } |
nothing calls this directly
no test coverage detected