Adopt location registry durable contract
This commit is contained in:
@@ -155,16 +155,16 @@ func TestResolverReusesEquivalentCanonicalRegistries(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func registryFixture() dnd.LocationList {
|
||||
func registryFixture() dnd.LocationRegistry {
|
||||
firstRefs := []source.SourceRef{{SourceID: "session-alpha", StartUnitID: 1, EndUnitID: 1}}
|
||||
secondRefs := []source.SourceRef{{SourceID: "session-alpha", StartUnitID: 2, EndUnitID: 2}}
|
||||
return dnd.LocationList{Locations: []dnd.Location{
|
||||
return dnd.LocationRegistry{Locations: []dnd.Location{
|
||||
{ID: identity.DeriveID("The Tavern", firstRefs), Name: "The Tavern", SourceRefs: firstRefs},
|
||||
{ID: identity.DeriveID("The Tavern", secondRefs), Name: "The Tavern", SourceRefs: secondRefs},
|
||||
}}
|
||||
}
|
||||
|
||||
func resolveList(t *testing.T, list dnd.LocationList) *Registry {
|
||||
func resolveList(t *testing.T, list dnd.LocationRegistry) *Registry {
|
||||
t.Helper()
|
||||
registry, err := Resolve(referenceSet(item(encodeList(t, list))))
|
||||
if err != nil {
|
||||
@@ -173,7 +173,7 @@ func resolveList(t *testing.T, list dnd.LocationList) *Registry {
|
||||
return registry
|
||||
}
|
||||
|
||||
func encodeList(t *testing.T, list dnd.LocationList) []byte {
|
||||
func encodeList(t *testing.T, list dnd.LocationRegistry) []byte {
|
||||
t.Helper()
|
||||
content, err := locationcodec.New().Encode(list)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user