added test

This commit is contained in:
snoop 2017-07-04 18:13:00 +09:00
parent 3badd6426b
commit 0736723c74

View File

@ -4,6 +4,7 @@ import com.loafle.overflow.module.apikey.model.ApiKey;
import com.loafle.overflow.module.domain.model.Domain; import com.loafle.overflow.module.domain.model.Domain;
import com.loafle.overflow.spring.AppConfig; import com.loafle.overflow.spring.AppConfig;
import com.loafle.overflow.spring.JdbcConfiguration; import com.loafle.overflow.spring.JdbcConfiguration;
import com.loafle.overflow.spring.MailConfiguration;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
@ -18,8 +19,7 @@ import static org.junit.Assert.*;
* Created by snoop on 17. 6. 28. * Created by snoop on 17. 6. 28.
*/ */
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class}) @ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class, MailConfiguration.class})
public class ApiKeyServiceTest { public class ApiKeyServiceTest {
@Autowired @Autowired
@ -57,4 +57,17 @@ public class ApiKeyServiceTest {
Assert.assertNotEquals(result, false); 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);
}
} }