aboutsummaryrefslogtreecommitdiffstats
path: root/board/resolver_test.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2022-08-18 16:03:48 +0200
committerGitHub <noreply@github.com>2022-08-18 16:03:48 +0200
commit6664a251f1893e6ddc183aa6061d6f0fd4f40a57 (patch)
treee42bcfc39ccf9284f645dde7ae5990c6d4995ade /board/resolver_test.go
parentec24de3f0d19ff1a56d0b12d389ec1535be43ea2 (diff)
parent45f5f852b71a63c142bca8b05efe53eebf142594 (diff)
downloadgit-bug-6664a251f1893e6ddc183aa6061d6f0fd4f40a57.tar.gz
Merge pull request #844 from MichaelMure/resolvers
WIP resolvers
Diffstat (limited to 'board/resolver_test.go')
-rw-r--r--board/resolver_test.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/board/resolver_test.go b/board/resolver_test.go
new file mode 100644
index 00000000..77bfbe61
--- /dev/null
+++ b/board/resolver_test.go
@@ -0,0 +1,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)
+}