package org.xmx0632.deliciousfruit.utilities.sms;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springside.modules.test.spring.SpringContextTestCase;
@ContextConfiguration(locations = { "/sms/applicationContext-sms.xml" })
public class SmsServiceTest extends SpringContextTestCase {
@Autowired
private SmsService smsService;
@Ignore
@Test
public void testSendResetPassword() {
try {
String mobileNo = "13800138000";
String userName = "test";
boolean success = smsService.sendResetPassword(userName, mobileNo,
"11223344");
assertTrue(success);
} catch (Exception e) {
e.printStackTrace();
fail("send sms error");
}
}
@Ignore
@Test
public void testSendDynamicPassword() {
try {
String mobileNo = "13800138000";
boolean success = smsService.sendDynamicPassword(mobileNo, "1234");
assertTrue(success);
} catch (Exception e) {
e.printStackTrace();
fail("send sms error");
}
}
}