mirror of
https://github.com/datarhei/core.git
synced 2025-09-27 04:16:25 +08:00
27 lines
579 B
Go
27 lines
579 B
Go
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)
|
|
}
|