📄 messagesenderimpltest.java
字号:
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.LoanApplication;
public class MessageSenderImplTest extends TestCase {
private static Log log = LogFactory.getLog(MessageSenderImplTest.class);
private ApplicationContext appContext;
public void setUp() throws IOException {
appContext = new ClassPathXmlApplicationContext(new String[] {
"loanapp-service.xml"});
log.debug("Got Spring Application Context:" + appContext);
}
protected void tearDown() throws Exception {
super.tearDown();
log.debug("Closing Application Context");
appContext = null;
}
public void testSendMessage() {
try {
log.debug("testSendMessage method called");
MessageSender messageSender = new MessageSenderImpl();
LoanApplication loanApp = new LoanApplication();
// Set Loan Parameters here
messageSender.send(loanApp);
log.debug("testSendMessage end");
} catch(Exception e) {
log.error(e,e);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -