MCPcopy Create free account
hub / github.com/DoNewsCode/core / TestCodecParser_Marshal

Function TestCodecParser_Marshal

config/codec_parser_test.go:12–18  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestCodecParser_Marshal(t *testing.T) {
13 parser := CodecParser{yaml.Codec{}}
14 data, err := parser.Marshal(map[string]interface{}{"foo": "bar", "baz": 1})
15 assert.NoError(t, err)
16 expected, _ := yaml2.Parser().Marshal(map[string]interface{}{"foo": "bar", "baz": 1})
17 assert.Equal(t, expected, data)
18}
19
20func TestCodecParser_Unmarshal(t *testing.T) {
21 raw, _ := ioutil.ReadFile("./testdata/codec_parser.yaml")

Callers

nothing calls this directly

Calls 2

MarshalMethod · 0.95
MarshalMethod · 0.65

Tested by

no test coverage detected