Martin Mucha has uploaded a new change for review.

Change subject: core: AuditLogDirectorTest 'revisit'.
......................................................................

core: AuditLogDirectorTest 'revisit'.

code was commented out 2 years ago --> this is dead code.

-removing unused code
-removing TOTO

Change-Id: Ibf2d2358aa6e22ce10795c6f22b3874c43e814ab
Signed-off-by: Martin Mucha <mmu...@redhat.com>
---
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirectorTest.java
1 file changed, 0 insertions(+), 62 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/90/29590/1

diff --git 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirectorTest.java
 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirectorTest.java
index 650562c..9b21c7b 100644
--- 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirectorTest.java
+++ 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirectorTest.java
@@ -1,10 +1,5 @@
 package org.ovirt.engine.core.dal.dbbroker.auditloghandling;
 
-/**
- * TODO:
- * Commented out test class in order to cancel dependency on PowerMock
- * This should be revisited.
- */
 import static org.mockito.Mockito.RETURNS_DEFAULTS;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -22,9 +17,6 @@
 import org.junit.rules.ErrorCollector;
 import org.ovirt.engine.core.common.AuditLogType;
 
-
-//@RunWith(PowerMockRunner.class)
-//@PrepareForTest({ AuditLogDirector.class })
 public class AuditLogDirectorTest {
 
     @Rule
@@ -36,60 +28,6 @@
         auditLogDirector = new AuditLogDirector();
     }
 
-    //
-//    @Mock
-//    DbFacade dbFacade;
-//    @Mock
-//    AuditLogDAO auditLogDao;
-//
-//    @Before
-//    public void initMocks() {
-//        initAuditLogDirectorMock();
-//        initDbFacadeMock();
-//    }
-//
-//    private void initDbFacadeMock() {
-//        when(dbFacade.getAuditLogDAO()).thenReturn(auditLogDao);
-//    }
-//
-//    private void initAuditLogDirectorMock() {
-//        PowerMockito.spy(AuditLogDirector.class);
-//        
PowerMockito.when(AuditLogDirector.getDbFacadeInstance()).thenReturn(dbFacade);
-//    }
-//
-//
-//    /**
-//     * The test assures that audit loggable objects with timeout, which were 
created without an explicit log type, with
-//     * a common key parts, except of the log type, are treated 
separately.<br>
-//     * The test invokes two {@Code AuditLogDirector.log()} calls and 
verifies that each call insert an entry into
-//     * the database.<br>
-//     */
-    // @Test
-    // public void testLegalAuditLog() {
-    // AuditLogableBase logableObject1 = new AuditLogableBase();
-    // AuditLogDirector.log(logableObject1, AuditLogType.IRS_DISK_SPACE_LOW);
-    //
-    // AuditLogableBase logableObject2 = new AuditLogableBase();
-    // AuditLogDirector.log(logableObject2, 
AuditLogType.IRS_DISK_SPACE_LOW_ERROR);
-    // Mockito.verify(auditLogDao, 
Mockito.times(2)).save(Mockito.any(AuditLog.class));
-    // }
-//
-//    /**
-//     * The test assures that audit loggable objects with timeout, which were 
created without an explicit log type and
-//     * share the same key are treated in respect to each other by the 
timeout gaps between events.<br>
-//     * The test invokes two {@Code AuditLogDirector.log()} calls and verify 
that only one call inserts an entry
-//     * into the database.
-//     */
-//    @Test
-//    public void testIllegalAuditLog() {
-//        AuditLogableBase logableObject1 = new AuditLogableBase();
-//        AuditLogDirector.log(logableObject1, 
AuditLogType.VDS_SLOW_STORAGE_RESPONSE_TIME);
-//        Mockito.verify(auditLogDao, 
Mockito.times(1)).save(Mockito.any(AuditLog.class));
-//
-//        AuditLogDirector.log(logableObject1, 
AuditLogType.VDS_SLOW_STORAGE_RESPONSE_TIME);
-//        Mockito.verify(auditLogDao, 
Mockito.times(1)).save(Mockito.any(AuditLog.class));
-//    }
-//
     @Test
     public void testResolveUnknownVariable() {
         final String message = "This is my ${Variable}";


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf2d2358aa6e22ce10795c6f22b3874c43e814ab
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmu...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to