Files
libopenapi/datamodel/high/shared_test.go
Dave Shanley 4771f8d7e9 Datamodel now at 100% coverage
working with k8s, stripe, petstore and locals. Speed is as good as I can make it at this point, not without further performance tunupes for memory consumption. less copying everywhere.
2022-08-30 09:07:03 -04:00

21 lines
559 B
Go

// Copyright 2022 Princess B33f Heavy Industries / Dave Shanley
// SPDX-License-Identifier: MIT
package high
import (
"github.com/pb33f/libopenapi/datamodel/low"
"github.com/stretchr/testify/assert"
"testing"
)
func TestExtractExtensions(t *testing.T) {
n := make(map[low.KeyReference[string]]low.ValueReference[any])
n[low.KeyReference[string]{
Value: "pb33f",
}] = low.ValueReference[any]{
Value: "new cowboy in town",
}
ext := ExtractExtensions(n)
assert.Equal(t, "new cowboy in town", ext["pb33f"])
}