Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
leelance committed Jul 5, 2016
1 parent 477d9eb commit 31fe10b
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.lance.email;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
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;

@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes=SimpleApplication.class)
public class EmailSenderTest {
private Logger logger = LogManager.getLogger(getClass());
@Autowired
private EmailSender emailSender;

@Test
public void sender() {
String to = "[email protected]";
String subject = "Test subject";
String content = "Hello Spring boot Email.";

boolean result = emailSender.sender(to, subject, content);
logger.info("-------------======---------------"+result);
}
}

0 comments on commit 31fe10b

Please sign in to comment.