blob: 77bfbe61067a26fb34fc55b621ad801952662da9 (
plain) (
blame)
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
|
package board
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
"github.com/MichaelMure/git-bug/bug"
"github.com/MichaelMure/git-bug/entity"
"github.com/MichaelMure/git-bug/identity"
"github.com/MichaelMure/git-bug/repository"
)
func TestResolvers(t *testing.T) {
repo := repository.NewMockRepo()
rs := entity.Resolvers{
&identity.IdentityStub{}: identity.NewStubResolver(),
&identity.Identity{}: identity.NewSimpleResolver(repo),
&bug.Bug{}: bug.NewSimpleResolver(repo),
}
ide, err := entity.Resolve[identity.Interface](rs, "foo")
require.NoError(t, err)
fmt.Println(ide)
}
|