(t *testing.T)
| 270 | } |
| 271 | |
| 272 | func Test_Object_AutoMapper_StructToMap(t *testing.T) { |
| 273 | m := NewMapper() |
| 274 | from := &FromStruct{Name: "From", Sex: true, AA: "AA"} |
| 275 | to := make(map[string]interface{}) |
| 276 | err := m.AutoMapper(from, &to) |
| 277 | if err != nil { |
| 278 | t.Error("RunResult error: mapper error", err) |
| 279 | } else { |
| 280 | if to["UserName"] == "From" { |
| 281 | t.Log("RunResult success:", to) |
| 282 | } else { |
| 283 | t.Error("RunResult failed: map[UserName]", to["UserName"]) |
| 284 | } |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | func Test_Object_MapperMap(t *testing.T) { |
| 289 | m := NewMapper() |
nothing calls this directly
no test coverage detected
searching dependent graphs…