Mike Kolesnik has posted comments on this change.
Change subject: core: Filtering for GetVmInterfacesByVmIdQuery
......................................................................
Patch Set 14: (4 inline comments)
....................................................
File
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/GetVmInterfacesByVmIdQueryTest.java
Line 41: GetVmByVmIdParameters params =
mock(GetVmByVmIdParameters.class);
Isn't this overuse of the mocking abilities?
Parameters are just POJOs, no need to mock them..
Line 46: when(query.getUser()).thenReturn(user);
Why would you mock this? It's not an external reference call..
Perhaps what you should mock is the initUser() method?
Line 50: verify(daoMock, times(1)).getAllForVm(guid, userID, true);
No need to explicitly specify times(1) since it's the default behavior of
verify() anyway.
....................................................
File
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmNetworkInterfaceDAOTest.java
Line 117: public void testGetAllInterfacesForVmFiltered() {
How about a test that actually finds something?
--
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