messagereceiverimpltest.java

来自「CAS Client Demo学习SSO 的最佳例子」· Java 代码 · 共 52 行

JAVA
52
字号
package com.loanapp.service;

import java.io.IOException;

import junit.framework.TestCase;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.loanapp.domain.CreditHistoryBean;

public class MessageReceiverImplTest extends TestCase {

	private static Log log = LogFactory.getLog(MessageReceiverImplTest.class);

	private ApplicationContext appContext;

	public void setUp() throws IOException {

		appContext = new ClassPathXmlApplicationContext(new String[] {
				"loanapp-jms-spring.xml"});

		log.debug("Got Spring Application Context:" + appContext);
	}

	protected void tearDown() throws Exception {
		super.tearDown();
		
		log.debug("Closing Application Context");
		appContext = null;
	}

	public void testReceiveMessage(String[] args) {
		try {
			log.debug("testReceiveMessage method.");
			
			MessageReceiver messageReceiver = new MessageReceiverImpl();
			
			CreditHistoryBean creditHistory = new CreditHistoryBean();
			
			creditHistory = messageReceiver.receive();
			
			log.debug("MessageReceiverImpl end");
		} catch(Exception e) {
			log.error(e,e);
		}
	}
		
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?