-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgoofy_test.go
37 lines (31 loc) · 890 Bytes
/
goofy_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package goofy_test
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/urionz/goofy"
)
func TestOption(t *testing.T) {
t.Run("set workspace option", func(t *testing.T) {
workspace := "./"
newApp := goofy.New(goofy.SetWorkspace(workspace))
require.NotNil(t, newApp)
require.Equal(t, workspace, newApp.Workspace())
})
}
func TName(name string) {
}
func TestApplication_Run(t *testing.T) {
t.Run("run application", func(t *testing.T) {
// app := goofy.New(goofy.SetWorkspace("./"))
//
// var storage string
// var database string
// require.NoError(t, app.Resolve(&storage, di.Tags{"name": "path.storage"}))
// require.Equal(t, "storage", storage)
// require.NoError(t, app.Resolve(&database, di.Tags{"name": "path.database"}))
// require.Equal(t, "database", database)
//
// err := app.Run().Error()
// require.NoError(t, err)
})
}