Created
August 9, 2016 07:35
-
-
Save SlyDen/fbc670beaaba28103649169722e5e794 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EqualsAndHashCode | |
class Person { | |
String name | |
String surname | |
int age | |
} | |
def test() { | |
given: | |
def person = new Person(name: 'name', surname: 'surname', age: 32) | |
def expectedProperties = [ | |
name : 'name', | |
surname: 'surname' | |
] | |
expect: | |
person.properties.subMap(expectedProperties.keySet()) == expectedProperties | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment