[email protected] has posted comments on this change.

Change subject: restapi: unit tests for VersionUtilsTest
......................................................................


Patch Set 2: Verified; Looks good to me, but someone else must approve

(2 inline comments)

I approve because everything in here is good, but it would be better with some 
additions; see inline.

....................................................
File 
backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/utils/VersionUtilsTest.java
Line 17: 
perhaps add an assertFalse() like you did in the second test method (below), to 
make sure that for first version which is lower than second version, false will 
be returned. (Right now if  greaterOrEqual() was implemented: {return true;} it 
would pass the test.

Line 31: 
Out of the three signatures of VersionUtils.greaterOrEqual(), two are tested in 
this Class:

- comparison of 
  org.ovirt.engine.core.compat.Version 
  org.ovirt.engine.core.compat.Version

- comparison of 
  org.ovirt.engine.api.model.Version 
  org.ovirt.engine.core.compat.Version

Not tested:
  org.ovirt.engine.api.model.Version
  org.ovirt.engine.api.model.Version

That's a shame because 7 places in REST-API code use the untested signature, 
whereas only 3 use the other two signatures combined. Do you think it's 
possible to add a test for the missing signature as well?

--
To view, visit http://gerrit.ovirt.org/2571
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6712e12a134933e6b70c72dd56780b7021b1a4d0
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: [email protected]
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to