import org.apache.commons.logging.LogFactory;
import org.junit.After;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.openecomp.policy.common.ia.DbAudit;
import org.openecomp.policy.common.ia.DbDAO;
import org.openecomp.policy.common.im.jpa.StateManagementEntity;
import org.openecomp.policy.jpa.BackUpMonitorEntity;
-@Ignore
public class DbAuditCompareEntriesTest {
private static Log logger = LogFactory.getLog(DbAuditCompareEntriesTest.class);
* Tests that a comparison between hashsets is successful if
* the entries match
*/
- //@Ignore
@Test
public void runAllTests() throws Exception {
logger.info("runAllTests: Entering");
//There is only one entry IntegrityAuditEntity, but we will check anyway
HashSet<String> classNameSet = dbDAO.getPersistenceClassNames();
for(String c : classNameSet){
- if (c.equals("org.openecomp.policy.common.ia.IntegrityAuditEntity")){
+ if (c.equals("org.openecomp.policy.common.ia.jpa.IntegrityAuditEntity")){
className = c;
}
}
dbAudit.writeAuditDebugLog(className, resourceName1, resourceName2, entry1, entry2);
- HashMap<Object, Object> myEntries = new HashMap<Object, Object>();
- HashMap<Object, Object> theirEntries = new HashMap<Object, Object>();
+ HashMap<Object, Object> myEntries = new HashMap<>();
+ HashMap<Object, Object> theirEntries = new HashMap<>();
myEntries.put("pdp1", entry1);
theirEntries.put("pdp1", entry2);
*/
entry2.setDesignated(true);
- myEntries = new HashMap<Object, Object>();
- theirEntries = new HashMap<Object, Object>();
+ myEntries = new HashMap<>();
+ theirEntries = new HashMap<>();
myEntries.put("pdp1", entry1);
theirEntries.put("pdp1", entry2);
// Clone the first entry
entry2 = SerializationUtils.clone(entry1);
- HashMap<Object, Object> myEntries = new HashMap<Object, Object>();
- HashMap<Object, Object> theirEntries = new HashMap<Object, Object>();
+ HashMap<Object, Object> myEntries = new HashMap<>();
+ HashMap<Object, Object> theirEntries = new HashMap<>();
myEntries.put("pdp1", entry1);
theirEntries.put("pdp1", entry2);
entry2.setFlag("flag2");
- myEntries = new HashMap<Object, Object>();
- theirEntries = new HashMap<Object, Object>();
+ myEntries = new HashMap<>();
+ theirEntries = new HashMap<>();
myEntries.put("pdp1", entry1);
theirEntries.put("pdp1", entry2);
// Clone the first entry
entry2 = SerializationUtils.clone(entry1);
- HashMap<Object, Object> myEntries = new HashMap<Object, Object>();
- HashMap<Object, Object> theirEntries = new HashMap<Object, Object>();
+ HashMap<Object, Object> myEntries = new HashMap<>();
+ HashMap<Object, Object> theirEntries = new HashMap<>();
myEntries.put("pdp1", entry1);
theirEntries.put("pdp1", entry2);
entry2.setAdminState("unlocked");
- myEntries = new HashMap<Object, Object>();
- theirEntries = new HashMap<Object, Object>();
+ myEntries = new HashMap<>();
+ theirEntries = new HashMap<>();
myEntries.put("pdp1", entry1);
theirEntries.put("pdp1", entry2);
entry2.setFpcCount(321L);
- myEntries = new HashMap<Object, Object>();
- theirEntries = new HashMap<Object, Object>();
+ myEntries = new HashMap<>();
+ theirEntries = new HashMap<>();
myEntries.put("pdp1", entry1);
theirEntries.put("pdp1", entry2);
// Clone the first entry
entry2 = SerializationUtils.clone(entry1);
- HashMap<Object, Object> myEntries = new HashMap<Object, Object>();
- HashMap<Object, Object> theirEntries = new HashMap<Object, Object>();
+ HashMap<Object, Object> myEntries = new HashMap<>();
+ HashMap<Object, Object> theirEntries = new HashMap<>();
myEntries.put("pdp1", entry1);
theirEntries.put("pdp1", entry2);
entry2.setSite("site_1a");
- myEntries = new HashMap<Object, Object>();
- theirEntries = new HashMap<Object, Object>();
+ myEntries = new HashMap<>();
+ theirEntries = new HashMap<>();
myEntries.put("pdp1", entry1);
theirEntries.put("pdp1", entry2);
assertEquals(1, result.size());
logger.info("testResourceRegistrationEntity: Exit");
}
-}
+}
\ No newline at end of file