Allon Mureinik has posted comments on this change.

Change subject: core: Filtering for GetVmInterfacesByVmIdQuery
......................................................................


Patch Set 14: (4 inline comments)

answered inline comments, will submit to patchset.

....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/GetVmInterfacesByVmIdQueryTest.java
Line 41:         GetVmByVmIdParameters params = 
mock(GetVmByVmIdParameters.class);
a question of style, IMHO.
I prefer assuming nothing about the objects of type X I use when testing class 
X.

Also, this has been very handy in extracting a base class to generalize this 
test.
(see change Ie2ede4ea).

Line 46:         when(query.getUser()).thenReturn(user);
initUser() is private and final exactly to avoid allowing mucking around with 
it.
mocking the getter is just easier - and cleaner. A test for 
GetVmInterfacesByVmIdQuery shouldn't have to know the internal PRIVATE methods 
of its superclass.

Line 50:         verify(daoMock, times(1)).getAllForVm(guid, userID, true);
accepted, will submit a new patchset

....................................................
File 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmNetworkInterfaceDAOTest.java
Line 117:     public void testGetAllInterfacesForVmFiltered() {
Agreed. Oversight.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I38719a861698dba647c5906b01e22a3a50df2ebe
Gerrit-PatchSet: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to