Refactored repository structure.

This commit is contained in:
Jay
2026-03-03 13:34:10 -05:00
parent 96f1ceb362
commit e9e153c9a1
15 changed files with 159 additions and 144 deletions

View File

@@ -1,43 +0,0 @@
package heartwood
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestToCypherLabel(t *testing.T) {
assert.Equal(t, ":`Event`", ToCypherLabel("Event"))
}
func TestToCypherLabels(t *testing.T) {
assert.Equal(t, ":`Event`:`ReplaceableEvent`",
ToCypherLabels([]string{"Event", "ReplaceableEvent"}))
}
func TestToCypherProps(t *testing.T) {
cases := []struct {
name string
keys []string
prefix string
expected string
}{
{
name: "default prefix",
keys: []string{"id", "name"},
prefix: "",
expected: "id: $id, name: $name",
},
{
name: "set prefix",
keys: []string{"id", "name"},
prefix: "entity.",
expected: "id: entity.id, name: entity.name",
},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
assert.Equal(t, tc.expected, ToCypherProps(tc.keys, tc.prefix))
})
}
}