Skip to content

Commit

Permalink
fix the order of expected and actual argument (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
skywhat authored Aug 19, 2019
1 parent 8601ef8 commit 1c1c8cd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions entity_parser_key_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ func TestPrimaryKey(t *testing.T) {
k, err := parsePrimaryKey("t", d.PrimaryKey)
if nil == d.Error {
assert.Nil(t, err)
assert.Equal(t, k.PartitionKeys, d.Result.PartitionKeys)
assert.Equal(t, k.ClusteringKeys, d.Result.ClusteringKeys)
assert.Equal(t, d.Result.PartitionKeys, k.PartitionKeys)
assert.Equal(t, d.Result.ClusteringKeys, k.ClusteringKeys)
} else {
assert.Contains(t, err.Error(), d.Error.Error())
}
Expand Down Expand Up @@ -318,8 +318,8 @@ func TestNameTag(t *testing.T) {
for _, d := range data {
fullName, name, err := parseNameTag(d.Tag, defaultName)
if d.Error == nil {
assert.Equal(t, name, d.Name)
assert.Equal(t, fullName, d.FullName)
assert.Equal(t, d.Name, name)
assert.Equal(t, d.FullName, fullName)
assert.Nil(t, err)
} else {
assert.Contains(t, err.Error(), d.Error.Error())
Expand Down Expand Up @@ -399,7 +399,7 @@ func TestFieldParse(t *testing.T) {
if d.Error != nil {
assert.Contains(t, err.Error(), d.Error.Error())
} else {
assert.Equal(t, cn, d.Column)
assert.Equal(t, d.Column, cn)
assert.Nil(t, err)
}
}
Expand Down Expand Up @@ -714,8 +714,8 @@ func TestEntityParse(t *testing.T) {
assert.Contains(t, err.Error(), d.Error.Error())
} else {
assert.Nil(t, err)
assert.Equal(t, tableName, d.TableName)
assert.Equal(t, primaryKey, d.PrimaryKey)
assert.Equal(t, d.TableName, tableName)
assert.Equal(t, d.PrimaryKey, primaryKey)
assert.Equal(t, d.ETL, etl)
assert.Equal(t, d.TTL, ttl)
}
Expand Down Expand Up @@ -956,9 +956,9 @@ func TestIndexParse(t *testing.T) {
assert.Contains(t, err.Error(), d.Error.Error())
} else {
assert.Nil(t, err)
assert.Equal(t, name, d.ExpectedIndexName)
assert.Equal(t, primaryKey, d.PrimaryKey)
assert.Equal(t, columns, d.Columns)
assert.Equal(t, d.ExpectedIndexName, name)
assert.Equal(t, d.PrimaryKey, primaryKey)
assert.Equal(t, d.Columns, columns)
}
}
}

0 comments on commit 1c1c8cd

Please sign in to comment.