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

Function Test_AutoMapper

mapper_test.go:307–316  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

305}
306
307func Test_AutoMapper(t *testing.T) {
308 from := &FromStruct{Name: "From", Sex: true, AA: "AA"}
309 to := &ToStruct{}
310 err := AutoMapper(from, to)
311 if err != nil {
312 t.Error("RunResult error: mapper error", err)
313 } else {
314 t.Log("RunResult success:", to)
315 }
316}
317
318func Test_AutoMapper_StructToMap(t *testing.T) {
319 from := &FromStruct{Name: "From", Sex: true, AA: "AA"}

Callers

nothing calls this directly

Calls 1

AutoMapperFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…