MCPcopy Create free account
hub / github.com/devfeel/mapper / Test_Object_Mapper

Function Test_Object_Mapper

mapper_object_test.go:143–154  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

141}
142
143func Test_Object_Mapper(t *testing.T) {
144 m := NewMapper()
145 m.SetEnabledTypeChecking(true)
146 from := &FromStruct{Name: "From", Sex: true, AA: "AA"}
147 to := &ToStruct{}
148 err := m.Mapper(from, to)
149 if err != nil {
150 t.Error("RunResult error: mapper error", err)
151 } else {
152 t.Log("RunResult success:", to)
153 }
154}
155
156func Test_Object_MapperSlice(t *testing.T) {
157 m := NewMapper()

Callers

nothing calls this directly

Calls 3

NewMapperFunction · 0.85
MapperMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…