/** * Failure test for the method <code>checkInitialization()</code> with auditActionTypeIdMap * doesn't contain values for keys "create", "update", "delete".<br> * <code>ConfigurationException</code> is expected. * * @throws Exception to JUnit. */ @Test(expected = ConfigurationException.class) public void test_checkInitialization_auditActionTypeIdMapRequiredMissing() throws Exception { Map<String, Integer> auditActionTypeIdMap = new HashMap<String, Integer>(); auditActionTypeIdMap.put("create", 1); auditActionTypeIdMap.put("update", 2); instance.setAuditActionTypeIdMap(auditActionTypeIdMap); instance.checkInitialization(); }
/** * Failure test for the method <code>checkInitialization()</code> with auditActionTypeIdMap * contains <code>null</code> value.<br> * <code>ConfigurationException</code> is expected. * * @throws Exception to JUnit. */ @Test(expected = ConfigurationException.class) public void test_checkInitialization_auditActionTypeIdMapContainsNullValue() throws Exception { Map<String, Integer> auditActionTypeIdMap = new HashMap<String, Integer>(); auditActionTypeIdMap.put("create", 1); auditActionTypeIdMap.put("update", 2); auditActionTypeIdMap.put("delete", 3); auditActionTypeIdMap.put("new", null); instance.setAuditActionTypeIdMap(auditActionTypeIdMap); instance.checkInitialization(); }
/** * Failure test for the method <code>checkInitialization()</code> with auditActionTypeIdMap * contains empty key.<br> * <code>ConfigurationException</code> is expected. * * @throws Exception to JUnit. */ @Test(expected = ConfigurationException.class) public void test_checkInitialization_auditActionTypeIdMapContainsEmptyKey() throws Exception { Map<String, Integer> auditActionTypeIdMap = new HashMap<String, Integer>(); auditActionTypeIdMap.put("create", 1); auditActionTypeIdMap.put("update", 2); auditActionTypeIdMap.put("delete", 3); auditActionTypeIdMap.put(TestsHelper.EMPTY_STRING, 4); instance.setAuditActionTypeIdMap(auditActionTypeIdMap); instance.checkInitialization(); }
/** * Failure test for the method <code>checkInitialization()</code> with auditActionTypeIdMap is * <code>null</code>.<br> * <code>ConfigurationException</code> is expected. * * @throws Exception to JUnit. */ @Test(expected = ConfigurationException.class) public void test_checkInitialization_auditActionTypeIdMapNull() throws Exception { instance.setAuditActionTypeIdMap(null); instance.checkInitialization(); }
/** * Failure test for the method <code>checkInitialization()</code> with * directProjectMetadataKeyValidator is <code>null</code>.<br> * <code>ConfigurationException</code> is expected. * * @throws Exception to JUnit. */ @Test(expected = ConfigurationException.class) public void test_checkInitialization_directProjectMetadataKeyValidatorNull() throws Exception { instance.setDirectProjectMetadataKeyValidator(null); instance.checkInitialization(); }
/** * Failure test for the method <code>checkInitialization()</code> with entityManager is <code>null * </code>.<br> * <code>ConfigurationException</code> is expected. * * @throws Exception to JUnit. */ @Test(expected = ConfigurationException.class) public void test_checkInitialization_entityManagerNull() throws Exception { instance.setEntityManager(null); instance.checkInitialization(); }
/** * Accuracy test for the method <code>checkInitialization()</code>.<br> * The result should be correct. * * @throws Exception to JUnit. */ @Test public void test_checkInitialization() throws Exception { instance.checkInitialization(); // Good }