Allon Mureinik has posted comments on this change. Change subject: core: Initialize internal lists in IscsiBond ......................................................................
Patch Set 2: (2 comments) http://gerrit.ovirt.org/#/c/31859/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetIscsiBondByIdQuery.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetIscsiBondByIdQuery.java: Line 9: super(parameters); Line 10: } Line 11: Line 12: @Override Line 13: public void executeQueryCommand() { Why make it public? Line 14: IscsiBond iscsiBond = getDbFacade().getIscsiBondDao().get(getParameters().getId()); Line 15: if (iscsiBond != null) { Line 16: iscsiBond.getNetworkIds().addAll(getDbFacade().getIscsiBondDao() Line 17: .getNetworkIdsByIscsiBondId(iscsiBond.getId())); http://gerrit.ovirt.org/#/c/31859/2/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/GetIscsiBondByIdQueryTest.java File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/storage/GetIscsiBondByIdQueryTest.java: Line 20: public class GetIscsiBondByIdQueryTest extends Line 21: AbstractQueryTest<IdQueryParameters, GetIscsiBondByIdQuery<IdQueryParameters>> { Line 22: Line 23: Guid iscsiBondId = Guid.newGuid(); Line 24: private IscsiBondDao iscsiBondDao = mock(IscsiBondDao.class); Use the @Mock annotation - it's cleaner. Line 25: Line 26: @Test Line 27: public void testExecuteQueryCommand() { Line 28: IscsiBond iscsiBond = mockIscsiBond(); -- To view, visit http://gerrit.ovirt.org/31859 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I167b1c6d6c5f83022c18faad555c0ff2e6f1f44b Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Ori Liel <[email protected]> Gerrit-Reviewer: Tal Nisan <[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
