Skip to content

Commit

Permalink
add another testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
vaskoz committed Sep 8, 2018
1 parent 92039bc commit e1978b3
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions schema_mapping/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ var testcases = []struct {
{src: Schema{[]Field{{"country", []string{"cnt", "countryLong"}}}},
target: Schema{[]Field{{"countryLong", []string{"country"}}}},
expected: map[string]string{"country": "countryLong"}},
{src: Schema{[]Field{
{"country", []string{"nationality"}},
{"state", []string{"st", "territory"}},
{"city", []string{"cty", "burrow"}},
}},
target: Schema{[]Field{
{"st", []string{"not country", "state", "sttt"}},
{"burrow", []string{"hometown", "city"}},
{"nationality", []string{"country", "nation", "residency"}},
}},
expected: map[string]string{
"country": "nationality",
"state": "st",
"city": "burrow",
}},
}

func TestMapping(t *testing.T) {
Expand Down

0 comments on commit e1978b3

Please sign in to comment.