// Path: jcart-core/src/main/java/com/sivalabs/jcart/common/services/EmailService.java
// @Component
// public class EmailService 
// {
// 	private static final JCLogger logger = JCLogger.getLogger(EmailService.class);
// 	
// 	@Autowired JavaMailSender javaMailSender;
// 	
// 	@Value("${support.email}") String supportEmail;
// 	
//     public void sendEmail(String to, String subject, String content)
// 	{
//         try
// 		{
//         	// Prepare message using a Spring helper
//             final MimeMessage mimeMessage = this.javaMailSender.createMimeMessage();
//             final MimeMessageHelper message = new MimeMessageHelper(mimeMessage, "UTF-8");
//             message.setSubject(subject);
//             message.setFrom(supportEmail);
//             message.setTo(to);
//             message.setText(content, true /* isHtml */);
//             
// 			javaMailSender.send(message.getMimeMessage());
// 		} 
//         catch (MailException | MessagingException e)
// 		{
//         	logger.error(e);
// 			throw new JCartException("Unable to send email");
// 		}
// 	}
// 	
// 	
// }


import static org.junit.Assert.*;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.sivalabs.jcart.common.services.EmailService;
/**
 * 
 */
package com.sivalabs.jcart;





/**
 * @author Siva
 *
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = JCartCoreApplication.class)
public class JCartCoreApplicationTest
{
	@Autowired DataSource dataSource;
// Path: jcart-core/src/main/java/com/sivalabs/jcart/common/services/EmailService.java
// @Component
// public class EmailService 
// {
// 	private static final JCLogger logger = JCLogger.getLogger(EmailService.class);
// 	
// 	@Autowired JavaMailSender javaMailSender;
// 	
// 	@Value("${support.email}") String supportEmail;
// 	
//     public void sendEmail(String to, String subject, String content)
// 	{
//         try
// 		{
//         	// Prepare message using a Spring helper
//             final MimeMessage mimeMessage = this.javaMailSender.createMimeMessage();
//             final MimeMessageHelper message = new MimeMessageHelper(mimeMessage, "UTF-8");
//             message.setSubject(subject);
//             message.setFrom(supportEmail);
//             message.setTo(to);
//             message.setText(content, true /* isHtml */);
//             
// 			javaMailSender.send(message.getMimeMessage());
// 		} 
//         catch (MailException | MessagingException e)
// 		{
//         	logger.error(e);
// 			throw new JCartException("Unable to send email");
// 		}
// 	}
// 	
// 	
// }


// Path: jcart-core/src/test/java/com/sivalabs/jcart/JCartCoreApplicationTest.java
import static org.junit.Assert.*;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.sivalabs.jcart.common.services.EmailService;

/**
 * 
 */
package com.sivalabs.jcart;





/**
 * @author Siva
 *
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = JCartCoreApplication.class)
public class JCartCoreApplicationTest
{
	@Autowired DataSource dataSource;
	@Autowired EmailService emailService;