Skip to content

Improve code coverage for ModelsListEmpty#214

Open
brarrow wants to merge 1 commit intomalinink:devfrom
brarrow:feature-191
Open

Improve code coverage for ModelsListEmpty#214
brarrow wants to merge 1 commit intomalinink:devfrom
brarrow:feature-191

Conversation

@brarrow
Copy link
Contributor

@brarrow brarrow commented Oct 20, 2017

CC improved to 100%
Is it good? Or need to change something?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 64.743% when pulling f80d8f5 on greenbarrow:feature-191 into aa5d60b on malinink:dev.

@malinink
Copy link
Owner

@greenbarrow https://stackoverflow.com/questions/4449728/how-can-i-do-unit-test-for-hashcode
Please look at comment below, it is important too

assertNotSame(obj1, obj2); // don't cheat
assertEquals(obj1.hashcode(), obj2.hashcode());

@brarrow
Copy link
Contributor Author

brarrow commented Oct 27, 2017

I think, there is no way in that class to prove that obj1.hashcode() equals obj2.hashcode.
Because ModelsListEmpty objects always have different hashcodes. Even in case of the same objects declaration. Also in each test it have different hashcodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants