(t *testing.T)
| 316 | } |
| 317 | |
| 318 | func Test_AutoMapper_StructToMap(t *testing.T) { |
| 319 | from := &FromStruct{Name: "From", Sex: true, AA: "AA"} |
| 320 | to := make(map[string]interface{}) |
| 321 | err := AutoMapper(from, &to) |
| 322 | if err != nil { |
| 323 | t.Error("RunResult error: mapper error", err) |
| 324 | } else { |
| 325 | if to["UserName"] == "From" { |
| 326 | t.Log("RunResult success:", to) |
| 327 | } else { |
| 328 | t.Error("RunResult failed: map[UserName]", to["UserName"]) |
| 329 | } |
| 330 | } |
| 331 | } |
| 332 | |
| 333 | func Test_MapperMap(t *testing.T) { |
| 334 | validateTime, _ := time.Parse("2006-01-02 15:04:05", "2017-01-01 10:00:00") |
nothing calls this directly
no test coverage detected
searching dependent graphs…