Changed the Groovy equals & hashcode usage to manual one

there's a bug in Groovy with autogenerated hashCode and byte arrays
to fix it we've migrated from the AST to manual hashcode and equals generation

fixes gh-546
This commit is contained in:
Marcin Grzejszczak
2018-03-21 14:03:06 +01:00
parent 0078230492
commit 297ee8e2ea
3 changed files with 90 additions and 13 deletions

View File

@@ -1232,7 +1232,7 @@ World.'''"""
multipart(
file: named(
name: value(stub(regex('.+')), test('file')),
content: value(stub(regex('.+')), test([100, 117, 112, 97] as byte[]))
content: value(stub(regex('.+')), test([100, 117, 100, 97] as byte[]))
)
)
}
@@ -1255,9 +1255,9 @@ World.'''"""
where:
methodBuilderName | methodBuilder | requestStrings
"MockMvcSpockMethodBuilder" | { Contract dsl -> new MockMvcSpockMethodRequestProcessingBodyBuilder(dsl, properties) } | ['"Content-Type", "multipart/form-data;boundary=AaB03x"',
""".multiPart('file', 'file', [100, 117, 112, 97] as byte[])"""]
""".multiPart('file', 'file', [100, 117, 100, 97] as byte[])"""]
"MockMvcJUnitMethodBuilder" | { Contract dsl -> new MockMvcJUnitMethodBodyBuilder(dsl, properties) } | ['"Content-Type", "multipart/form-data;boundary=AaB03x"',
'.multiPart("file", "file", new byte[] {100, 117, 112, 97});']
'.multiPart("file", "file", new byte[] {100, 117, 100, 97});']
}
@Issue('541')