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 SmsSenderTest extends SpringContextTestCase { @Autowired private SmsSender smsSender; @Ignore @Test public void testSend() { try { String mobileNo = "13800138000"; String message = "test"; boolean success = smsSender.send(message, mobileNo); assertTrue(success); } catch (Exception e) { e.printStackTrace(); fail("send sms error"); } } }