[Batchserver-cvs] batchserver/test/org/jmonks/batch/framework LoggingManagerTest.java, 1.1, 1.2 Mai
Brought to you by:
suresh_pragada
From: Suresh <sur...@us...> - 2006-09-15 22:04:45
|
Update of /cvsroot/batchserver/batchserver/test/org/jmonks/batch/framework In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5850/framework Modified Files: LoggingManagerTest.java MainTest.java Log Message: no message Index: LoggingManagerTest.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batch/framework/LoggingManagerTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** LoggingManagerTest.java 15 Sep 2006 20:21:13 -0000 1.1 --- LoggingManagerTest.java 15 Sep 2006 22:04:43 -0000 1.2 *************** *** 9,17 **** import junit.framework.*; - import org.apache.log4j.Logger; - import org.jmonks.batch.framework.config.JobLoggingConfig; - import org.jmonks.batch.framework.config.JobConfigFactory; import org.jmonks.batch.framework.config.FrameworkConfig; ! import org.jmonks.batch.framework.config.JobConfig; /** --- 9,14 ---- import junit.framework.*; import org.jmonks.batch.framework.config.FrameworkConfig; ! /** *************** *** 50,71 **** public void testInitializeJobLogging() { ! assertNotNull(frameworkConfig); ! FrameworkConfig.FrameworkLoggingConfig loggingConfig=frameworkConfig.getFrameworkLoggingConfig(); ! assertNotNull(loggingConfig); ! FrameworkConfig.JobConfigFactoryConfig configFactoryConfig=frameworkConfig.getJobConfigFactoryConfig(); ! assertNotNull(configFactoryConfig); ! JobConfigFactory factory=JobConfigFactory.getJobConfigFactory(configFactoryConfig); ! assertNotNull(factory); ! JobConfig jobConfig=factory.getJobConfig("process_file_xyz"); ! assertNotNull(jobConfig); ! JobLoggingConfig jobLoggingConfig=jobConfig.getJobLoggingConfig(); ! assertNotNull(jobLoggingConfig); ! LoggingManager.initializeJobLogging("process_file_xyz", loggingConfig,jobLoggingConfig); ! ! Logger logger=Logger.getLogger(LoggingManagerTest.class); ! logger.debug("This is debug message after job initialization"); ! logger.info("This is info message after job initialization"); ! logger.warn("This is warn message after job initialization"); ! logger.error("This is error message after job initialization"); } --- 47,58 ---- public void testInitializeJobLogging() { ! try ! { ! LoggingManager.initializeJobLogging("process_file_xyz", null,null, null); ! fail("LoggingManager shouldn't have been initialized by other than Main."); ! } ! catch(SecurityException exception) ! { ! } } *************** *** 76,89 **** public void testInitializeFrameworkLogging() { ! assertNotNull(frameworkConfig); ! FrameworkConfig.FrameworkLoggingConfig loggingConfig=frameworkConfig.getFrameworkLoggingConfig(); ! assertNotNull(loggingConfig); ! LoggingManager.initializeFrameworkLogging(loggingConfig); ! Logger logger=Logger.getLogger(LoggingManagerTest.class); ! logger.debug("This is debug message"); ! logger.info("This is info message"); ! logger.warn("This is warn message"); ! logger.error("This is error message"); } - } --- 63,74 ---- public void testInitializeFrameworkLogging() { ! try ! { ! LoggingManager.initializeFrameworkLogging(null, null); ! fail("LoggingManager shouldn't have been initialized by other than Main."); ! } ! catch(SecurityException exception) ! { ! } } } Index: MainTest.java =================================================================== RCS file: /cvsroot/batchserver/batchserver/test/org/jmonks/batch/framework/MainTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MainTest.java 15 Sep 2006 20:21:13 -0000 1.1 --- MainTest.java 15 Sep 2006 22:04:43 -0000 1.2 *************** *** 85,87 **** --- 85,89 ---- assertEquals(ErrorCode.JOB_IS_NOT_CONFIGURED.getCode(), exitCode); } + + } |