Allon Mureinik has posted comments on this change.
Change subject: core: Migrated LoggedUtilsTest to Mockito
......................................................................
Patch Set 2: (15 inline comments)
Answered inline, fixes in next patchset.
....................................................
File
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/log/LoggedUtilsTest.java
Line 123: when(log.isDebugEnabled()).thenReturn(false);
Done.
Thanks for the catch,.
Refactoring using find+replace isn't always as good as refactoring using common
sense :-)
Line 145: public void testLogOff() throws Exception {
bahh...
/me is blind.
Line 254: LoggedUtils.logEntry(log, "", new Object());
Done
Line 260: when(log.isDebugEnabled()).thenReturn(false);
Done
Line 262: LoggedUtils.logEntry(log, "", new LoggedOverridingSubclass());
Not ZERO interactions (isLogLevelOn is called), but there should be a
verfication that the log method wasn't called.
Line 280: LoggedUtils.logReturn(log, "", new Object(), new Object());
Not ZERO interactions (isLogLevelOn is called), but there should be a
verfication that the log method wasn't called.
Line 286: when(log.isDebugEnabled()).thenReturn(false);
Done
Line 288: LoggedUtils.logReturn(log, "", new
LoggedOverridingSubclass(), new Object());
Not ZERO interactions (isLogLevelOn is called), but there should be a
verfication that the log method wasn't called.
Line 292: public void
testLogReturnLogsWhenLogLevelActiveAndNoExpthenReturn() throws Exception {
revereted the name change here too.
Line 296: when(log.isDebugEnabled()).thenReturn(false);
Done
Line 303: public void testLogReturnLogsWhenLogLevelActiveAndExpthenReturn()
throws Exception {
find+replace bug when changing EasyMock's andReturn to Mockito's thenRetrun
refactoring with regexes is rarely a good idea.
Line 313: public void
testLogReturnLogsWhenLogLevelActiveAndExpthenReturnButNullReturn() throws
Exception {
Done
Line 327: LoggedUtils.logError(log, "", new Object(), new Exception());
Done
Line 333: when(log.isWarnEnabled()).thenReturn(false);
Done
Line 335: LoggedUtils.logError(log, "", new LoggedOverridingSubclass(),
new Exception());
Done
--
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