package registry_test

import (
	"flow/internal/assert"
	"flow/registry"
	"testing"
)

func TestNewEntryInvalid(t *testing.T) {
	assert := assert.A(t)
	e := registry.NewEntry("string")
	assert.Eq(e.Err(), registry.ErrNotAFunc, "entry is not a function")
}
func TestNewEntryValid(t *testing.T) {
	assert := assert.A(t)
	e := registry.NewEntry(func(a int) int { return 0 })
	assert.Eq(e.Err(), nil, "Fetching an entry")
}
