Mike Kolesnik has posted comments on this change.

Change subject: core: Migrated LoggedUtilsTest to Mockito
......................................................................


Patch Set 2: (14 inline comments)

Very good effort!

A few comments inline..

....................................................
File 
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/log/LoggedUtilsTest.java
Line 123:         when(log.isDebugEnabled()).thenReturn(false);
No need to return false explicitly since it is the default mocking behavior

Line 145:     public void testLogOff() throws Exception {
How is this different than previous test?

Line 254:         LoggedUtils.logEntry(log, "", new Object());
Need to verify no interactions with log

Line 260:         when(log.isDebugEnabled()).thenReturn(false);
No need to mock, this is the default value.

Line 262:         LoggedUtils.logEntry(log, "", new LoggedOverridingSubclass());
Need to verify no interactions with log

Line 280:         LoggedUtils.logReturn(log, "", new Object(), new Object());
Need to verify no interactions with log

Line 286:         when(log.isDebugEnabled()).thenReturn(false);
No need to mock, this is the default value.

Line 288:         LoggedUtils.logReturn(log, "", new 
LoggedOverridingSubclass(), new Object());
Need to verify no interactions with log

Line 296:         when(log.isDebugEnabled()).thenReturn(false);
No need to mock, this is the default value.

Line 303:     public void testLogReturnLogsWhenLogLevelActiveAndExpthenReturn() 
throws Exception {
Why change to then?

Expand makes sense, but what is Expthen?

Line 313:     public void 
testLogReturnLogsWhenLogLevelActiveAndExpthenReturnButNullReturn() throws 
Exception {
Again, Why change to then?

Line 327:         LoggedUtils.logError(log, "", new Object(), new Exception());
Need to verify no interactions with log

Line 333:         when(log.isWarnEnabled()).thenReturn(false);
No need to mock, this is the default behavior.

Line 335:         LoggedUtils.logError(log, "", new LoggedOverridingSubclass(), 
new Exception());
Need to verify no interactions with log

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If01b736151033288424ae6a4d68ea97f9667f880
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to