(t *testing.T, a, b *Entity)
| 50 | } |
| 51 | |
| 52 | func assertEqualEntities(t *testing.T, a, b *Entity) { |
| 53 | t.Helper() |
| 54 | |
| 55 | // testify doesn't support comparing functions and systematically fail if they are not nil |
| 56 | // so we have to set them to nil temporarily |
| 57 | |
| 58 | backOpUnA := a.Definition.OperationUnmarshaler |
| 59 | backOpUnB := b.Definition.OperationUnmarshaler |
| 60 | |
| 61 | a.Definition.OperationUnmarshaler = nil |
| 62 | b.Definition.OperationUnmarshaler = nil |
| 63 | |
| 64 | defer func() { |
| 65 | a.Definition.OperationUnmarshaler = backOpUnA |
| 66 | b.Definition.OperationUnmarshaler = backOpUnB |
| 67 | }() |
| 68 | |
| 69 | require.Equal(t, a, b) |
| 70 | } |
no test coverage detected