Moti Asayag has posted comments on this change. Change subject: engine: Improve test assert messages ......................................................................
Patch Set 4: (1 comment) http://gerrit.ovirt.org/#/c/27775/4/backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/utils/PairTest.java File backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/utils/PairTest.java: Line 25: Pair<Boolean, String> p1 = new Pair<Boolean, String>(true, "abc"); Line 26: Pair<Boolean, String> p2 = new Pair<Boolean, String>(true, "abc"); Line 27: Pair<Boolean, String> p3 = new Pair<Boolean, String>(false, "abc"); Line 28: Line 29: Assert.assertEquals(p1, p2); > This wasn't part of the original test, so such a change will change the sem in order to gain a better coverage of the Pair.equals(Object) method, another case should be added: p1.equals(p1); //here assertSame(p1, p1) is valid and p1.equals(p2); //here assertNotSame(p1, p2) is valid but taking another second to think of it, adding the assertSame presumes the implementation of the equal method - therefore it shouldn't be part of the test. sorry for the noise. Line 30: Assert.assertNotEquals(p1, p3); Line 31: } -- To view, visit http://gerrit.ovirt.org/27775 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie5bdb907e57b51fcdd8fd8b7a9148273c0304d11 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Juan Hernandez <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Mike Kolesnik <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Ori Liel <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: Sahina Bose <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: Vojtech Szocs <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
