MCPcopy Create free account
hub / github.com/ankorstore/yokai / TestNewFxHttpServerModuleInfo

Function TestNewFxHttpServerModuleInfo

fxhttpserver/info_test.go:12–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestNewFxHttpServerModuleInfo(t *testing.T) {
13 t.Parallel()
14
15 cfg, err := config.NewDefaultConfigFactory().Create(
16 config.WithFilePaths("./testdata/config"),
17 )
18 assert.NoError(t, err)
19
20 httpServer := echo.New()
21 httpServer.Debug = true
22
23 info := fxhttpserver.NewFxHttpServerModuleInfo(httpServer, cfg)
24 assert.IsType(t, &fxhttpserver.FxHttpServerModuleInfo{}, info)
25
26 assert.Equal(t, fxhttpserver.ModuleName, info.Name())
27 assert.Equal(
28 t,
29 map[string]interface{}{
30 "address": fxhttpserver.DefaultAddress,
31 "debug": true,
32 "binder": "*echo.DefaultBinder",
33 "serializer": "*echo.DefaultJSONSerializer",
34 "renderer": "<nil>",
35 "errorHandler": "echo.HTTPErrorHandler",
36 "routes": []*echo.Route{},
37 },
38 info.Data(),
39 )
40}

Callers

nothing calls this directly

Calls 3

NameMethod · 0.95
DataMethod · 0.95
CreateMethod · 0.65

Tested by

no test coverage detected