This repository has been archived on 2020-09-27. You can view files and clone it, but cannot push or open issues or pull requests.
thrempp/component/main_test.go

26 lines
502 B
Go

package component
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestAddComponent(t *testing.T) {
assert := assert.New(t)
AddComponent("a", func(config map[string]interface{}) (Component, error) { return nil, nil })
assert.NotNil(components["a"])
assert.Len(components, 1)
}
func TestLoad(t *testing.T) {
AddComponent("a", func(config map[string]interface{}) (Component, error) { return nil, nil })
Load([]Config{
{},
// {Type: "a", Connection: "[::1]:10001"},
})
}