package app import ( "testing" "github.com/stretchr/testify/require" ) func TestCreateCommand(t *testing.T) { config := &Config{ Options: []string{"-global", "global"}, Input: []ConfigIO{ {Address: "inputAddress", Options: []string{"-input", "inputoption"}}, }, Output: []ConfigIO{ {Address: "outputAddress", Options: []string{"-output", "oututoption"}}, }, } command := config.CreateCommand() require.Equal(t, []string{ "-global", "global", "-input", "inputoption", "-i", "inputAddress", "-output", "oututoption", "outputAddress", }, command) }