From 0736723c745b7f5d7d3b26b75f41a26ae6aa4dea Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 4 Jul 2017 18:13:00 +0900 Subject: [PATCH] added test --- .../apikey/service/ApiKeyServiceTest.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/loafle/overflow/module/apikey/service/ApiKeyServiceTest.java b/src/test/java/com/loafle/overflow/module/apikey/service/ApiKeyServiceTest.java index fc01b92..be07583 100644 --- a/src/test/java/com/loafle/overflow/module/apikey/service/ApiKeyServiceTest.java +++ b/src/test/java/com/loafle/overflow/module/apikey/service/ApiKeyServiceTest.java @@ -4,6 +4,7 @@ import com.loafle.overflow.module.apikey.model.ApiKey; import com.loafle.overflow.module.domain.model.Domain; import com.loafle.overflow.spring.AppConfig; import com.loafle.overflow.spring.JdbcConfiguration; +import com.loafle.overflow.spring.MailConfiguration; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; @@ -18,8 +19,7 @@ import static org.junit.Assert.*; * Created by snoop on 17. 6. 28. */ @RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class}) - +@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class, MailConfiguration.class}) public class ApiKeyServiceTest { @Autowired @@ -57,4 +57,17 @@ public class ApiKeyServiceTest { Assert.assertNotEquals(result, false); } + @Ignore + @Test + public void findByDomain() { + + Domain domain = new Domain(); + domain.setId(1); + + ApiKey apiKey = this.apiKeyService.readByDomain(domain); + + Assert.assertNotEquals(apiKey, null); + + } + } \ No newline at end of file