From d205de4546b81715925514cf26acfaf306c7ad78 Mon Sep 17 00:00:00 2001 From: insanity Date: Mon, 26 Jun 2017 11:58:26 +0900 Subject: [PATCH] old test classes had remove. --- .../overflow/module/target/dao/TargetDAO.java | 4 +- src/main/resources/database.properties | 4 +- .../overflow/agent/dao/JPAAgentDAOTest.java | 36 -------- .../overflow/apikey/dao/JPAApiKeyDaoTest.java | 54 ----------- .../crawler/dao/JPACrawlerDAOTest.java | 78 ---------------- .../dao/JPACrawlerInputItemDAOTest.java | 62 ------------- .../JPACrawlerInputItemMappingDAOTest.java | 89 ------------------- .../email/dao/JPAEmailAuthDAOTest.java | 77 ---------------- .../overflow/infra/dao/JPAInfraDAOTest.java | 82 ----------------- .../overflow/member/dao/JPAMemberDAOTest.java | 42 --------- .../infra/dao/MetaInfraDAOTest.java} | 6 +- .../target/dao/TargetDAOTest.java} | 7 +- .../overflow/sensor/dao/JPASensorDaoTest.java | 55 ------------ .../dao/JPASensorItemCategoryDaoTest.java | 36 -------- .../sensor/dao/JPASensorItemDaoTest.java | 61 ------------- .../dao/JPASensorItemMappingDaoTest.java | 59 ------------ 16 files changed, 11 insertions(+), 741 deletions(-) delete mode 100644 src/test/java/com/loafle/overflow/agent/dao/JPAAgentDAOTest.java delete mode 100644 src/test/java/com/loafle/overflow/apikey/dao/JPAApiKeyDaoTest.java delete mode 100644 src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerDAOTest.java delete mode 100644 src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerInputItemDAOTest.java delete mode 100644 src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerInputItemMappingDAOTest.java delete mode 100644 src/test/java/com/loafle/overflow/email/dao/JPAEmailAuthDAOTest.java delete mode 100644 src/test/java/com/loafle/overflow/infra/dao/JPAInfraDAOTest.java delete mode 100644 src/test/java/com/loafle/overflow/member/dao/JPAMemberDAOTest.java rename src/test/java/com/loafle/overflow/{infra/dao/JPAMetaInfraDAOTest.java => module/infra/dao/MetaInfraDAOTest.java} (97%) rename src/test/java/com/loafle/overflow/{target/dao/JPATargetDAOTest.java => module/target/dao/TargetDAOTest.java} (89%) delete mode 100644 src/test/java/com/loafle/overflow/sensor/dao/JPASensorDaoTest.java delete mode 100644 src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemCategoryDaoTest.java delete mode 100644 src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemDaoTest.java delete mode 100644 src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemMappingDaoTest.java diff --git a/src/main/java/com/loafle/overflow/module/target/dao/TargetDAO.java b/src/main/java/com/loafle/overflow/module/target/dao/TargetDAO.java index 59264ee..db22668 100644 --- a/src/main/java/com/loafle/overflow/module/target/dao/TargetDAO.java +++ b/src/main/java/com/loafle/overflow/module/target/dao/TargetDAO.java @@ -3,7 +3,6 @@ package com.loafle.overflow.module.target.dao; import com.loafle.overflow.module.probe.model.Probe; import com.loafle.overflow.module.target.model.Target; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Query; import java.util.List; @@ -12,6 +11,5 @@ import java.util.List; * Created by root on 17. 6. 5. */ public interface TargetDAO extends JpaRepository { -// @Query("SELECT m FROM TARGET m WHERE m.probeId = :probeId") -// List findAllByProbe(Probe probe); + List findAllByProbe(Probe probe); } diff --git a/src/main/resources/database.properties b/src/main/resources/database.properties index 22f6e34..eb1b237 100644 --- a/src/main/resources/database.properties +++ b/src/main/resources/database.properties @@ -1,11 +1,11 @@ -spring.datasource.url=jdbc:postgresql://192.168.1.106:5432/overflow +spring.datasource.url=jdbc:postgresql://192.168.1.209:5432/overflow spring.datasource.username=overflow spring.datasource.password=qwer5795 spring.datasource.driver-class-name=org.postgresql.Driver spring.jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect spring.jpa.database=postgresql -spring.jpa.hibernate.ddl-auto=update +spring.jpa.hibernate.ddl-auto=create #spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy spring.jpa.show-sql=true diff --git a/src/test/java/com/loafle/overflow/agent/dao/JPAAgentDAOTest.java b/src/test/java/com/loafle/overflow/agent/dao/JPAAgentDAOTest.java deleted file mode 100644 index 701644c..0000000 --- a/src/test/java/com/loafle/overflow/agent/dao/JPAAgentDAOTest.java +++ /dev/null @@ -1,36 +0,0 @@ -//package com.loafle.overflow.agent.dao; -// -//import com.loafle.overflow.module.probe.dao.JPAAgentDAO; -//import com.loafle.overflow.module.probe.model.Agent; -//import com.loafle.overflow.module.member.model.Member; -//import org.junit.Before; -//import org.junit.Ignore; -//import org.junit.Test; -// -///** -// * Created by root on 17. 6. 4. -// */ -//@Ignore -//public class JPAAgentDAOTest { -// -// private JPAAgentDAO jpaAgentDAO = null; -// -// @Before -// public void before() { -// this.jpaAgentDAO = new JPAAgentDAO(); -// } -// -// -// @Test -// public void createAgent() { -// Member m = new Member(); -// m.setId(Long.valueOf(1)); -// Agent probe = new Agent(); -// probe.setDescription("test probe"); -// probe.setMember(m); -// Agent savedAgent = jpaAgentDAO.create(probe); -// -// System.out.println(savedAgent.getDescription()); -// } -// -//} \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/apikey/dao/JPAApiKeyDaoTest.java b/src/test/java/com/loafle/overflow/apikey/dao/JPAApiKeyDaoTest.java deleted file mode 100644 index 1a055f5..0000000 --- a/src/test/java/com/loafle/overflow/apikey/dao/JPAApiKeyDaoTest.java +++ /dev/null @@ -1,54 +0,0 @@ -//package com.loafle.overflow.apikey.dao; -// -//import com.loafle.overflow.module.apikey.dao.JPAApiKeyDao; -//import com.loafle.overflow.module.apikey.model.Apikey; -//import com.loafle.overflow.module.member.model.Member; -//import org.junit.Before; -//import org.junit.Ignore; -//import org.junit.Test; -// -//import java.util.Date; -// -///** -// * Created by root on 17. 6. 4. -// */ -//public class JPAApiKeyDaoTest { -// -// private JPAApiKeyDao jpaApiKeyDao; -// -// @Before -// public void Before() { -// this.jpaApiKeyDao = new JPAApiKeyDao(); -// } -// -// -// @Ignore -// @Test -// public void findByApiKey() throws Exception { -// -// Apikey apikey = new Apikey(); -// -// apikey.setApiKey("1111111"); -// -// Apikey a = this.jpaApiKeyDao.findByApiKey(apikey); -// -// System.out.println(a.getId()); -// -// } -// -// @Ignore -// @Test -// public void createApiKey() { -// Apikey apikey = new Apikey(); -// -// apikey.setApiKey("1111111"); -// apikey.setCreateDate(new Date()); -// Member member = new Member(); -// member.setId((long)2); -// apikey.setMember(member); -// -// -// jpaApiKeyDao.create(apikey); -// } -// -//} \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerDAOTest.java b/src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerDAOTest.java deleted file mode 100644 index 137aec0..0000000 --- a/src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerDAOTest.java +++ /dev/null @@ -1,78 +0,0 @@ -//package com.loafle.overflow.crawler.dao; -// -// -//import com.loafle.overflow.module.crawler.dao.JPACrawlerDAO; -//import com.loafle.overflow.module.crawler.model.Crawler; -//import org.junit.Before; -//import org.junit.Ignore; -//import org.junit.Test; -// -//import java.util.ArrayList; -//import java.util.List; -// -///** -// * Created by geek@loafle.com on 17. 6. 8. -// */ -//@Ignore -//public class JPACrawlerDAOTest { -// -// private JPACrawlerDAO jpaCrawlerDAO = null; -// -// @Before -// public void before() { -// this.jpaCrawlerDAO = new JPACrawlerDAO(); -// -// } -// -// // TODO Crawler Meta Data Insert -// @Test -// public void TestInsertList() { -// List crawlers = new ArrayList(); -// -// Crawler crawler1 = new Crawler(); -// crawler1.setName("SNMP Crawler"); -// crawler1.setDescription("SNMP Crawler"); -// crawler1.setCrawlerType("SNMP"); -// -// Crawler crawler2 = new Crawler(); -// crawler2.setName("WMI Crawler"); -// crawler2.setDescription("WMI Crawler"); -// crawler2.setCrawlerType("WMI"); -// -// Crawler crawler3 = new Crawler(); -// crawler3.setName("HTTP Crawler"); -// crawler3.setDescription("HTTP Crawler"); -// crawler3.setCrawlerType("Network"); -// -// Crawler crawler4 = new Crawler(); -// crawler4.setName("FTP Crawler"); -// crawler4.setDescription("FTP Crawler"); -// crawler4.setCrawlerType("Network"); -// -// crawlers.add(crawler1); -// crawlers.add(crawler2); -// crawlers.add(crawler3); -// crawlers.add(crawler4); -// -// this.jpaCrawlerDAO.createAll(crawlers); -// } -// -// @Test -// public void TestInsert() { -// Crawler crawler = new Crawler(); -// crawler.setName("Mysql Crawler"); -// crawler.setDescription("Mysql Crawler"); -// crawler.setCrawlerType("MysqlCrawler"); -// this.jpaCrawlerDAO.create(crawler); -// } -// // TODO Crawler Select Test -// -// @Test -// public void TestListAll() { -// List ls = this.jpaCrawlerDAO.findAll(); -// System.out.println(ls.size()); -// } -// // TODO Crawler Update Test -// -// // TODO Crawler Delete Test -//} \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerInputItemDAOTest.java b/src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerInputItemDAOTest.java deleted file mode 100644 index 50c403b..0000000 --- a/src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerInputItemDAOTest.java +++ /dev/null @@ -1,62 +0,0 @@ -//package com.loafle.overflow.crawler.dao; -// -//import com.loafle.overflow.module.crawler.dao.JPACrawlerInputItemDAO; -//import com.loafle.overflow.module.crawler.model.CrawlerInputItem; -//import org.junit.Before; -//import org.junit.Ignore; -//import org.junit.Test; -// -//import java.util.ArrayList; -//import java.util.List; -// -///** -// * Created by geek@loafle.com on 17. 6. 8. -// */ -//@Ignore -//public class JPACrawlerInputItemDAOTest { -// -// private JPACrawlerInputItemDAO inputItemDAO = null; -// -// @Before -// public void before() { -// this.inputItemDAO = new JPACrawlerInputItemDAO(); -// } -// -// @Test -// public void TestInsertList() { -// List cris = new ArrayList(); -// -// CrawlerInputItem item1 = new CrawlerInputItem(); -// item1.setName("ID"); -// item1.setDataType("String"); -// item1.setDescription("Auth ID"); -// -// CrawlerInputItem item2 = new CrawlerInputItem(); -// item2.setName("PW"); -// item2.setDataType("String"); -// item2.setDescription("Auth PW"); -// -// CrawlerInputItem item3 = new CrawlerInputItem(); -// item3.setName("AuthType"); -// item3.setDataType("Select"); -// item3.setDescription("MD5||SHA"); -// -// CrawlerInputItem item4 = new CrawlerInputItem(); -// item4.setName("community"); -// item4.setDataType("String"); -// item4.setDescription("community"); -// -// CrawlerInputItem item5 = new CrawlerInputItem(); -// item5.setName("textfield"); -// item5.setDataType("String"); -// item5.setDescription("User ID"); -// -// cris.add(item1); -// cris.add(item2); -// cris.add(item3); -// cris.add(item4); -// cris.add(item5); -// -// this.inputItemDAO.createAll(cris); -// } -//} \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerInputItemMappingDAOTest.java b/src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerInputItemMappingDAOTest.java deleted file mode 100644 index c03a170..0000000 --- a/src/test/java/com/loafle/overflow/crawler/dao/JPACrawlerInputItemMappingDAOTest.java +++ /dev/null @@ -1,89 +0,0 @@ -//package com.loafle.overflow.crawler.dao; -// -//import com.loafle.overflow.module.crawler.dao.JPACrawlerInputItemMappingDAO; -//import com.loafle.overflow.module.crawler.model.Crawler; -//import com.loafle.overflow.module.crawler.model.CrawlerInputItem; -//import com.loafle.overflow.module.crawler.model.CrawlerInputItemMapping; -//import org.junit.Before; -//import org.junit.Ignore; -//import org.junit.Test; -// -//import java.util.ArrayList; -//import java.util.List; -// -///** -// * Created by geek@loafle.com on 17. 6. 8. -// */ -//@Ignore -//public class JPACrawlerInputItemMappingDAOTest { -// -// private JPACrawlerInputItemMappingDAO mappingDAO = null; -// -// @Before -// public void before() { -// this.mappingDAO = new JPACrawlerInputItemMappingDAO(); -// } -// -// @Test -// public void TestInsert() { -// CrawlerInputItemMapping itemMapping = new CrawlerInputItemMapping(); -// itemMapping.setCrawler(new Crawler((long)5)); -// itemMapping.setCrawlerInputItem(new CrawlerInputItem((long)1)); -// itemMapping.setPriority((short) 1); -// itemMapping.setRequiredType(true); -// -// CrawlerInputItemMapping itemMapping1 = new CrawlerInputItemMapping(); -// itemMapping1.setCrawler(new Crawler((long)5)); -// itemMapping1.setCrawlerInputItem(new CrawlerInputItem((long)2)); -// itemMapping1.setPriority((short) 2); -// itemMapping1.setRequiredType(true); -// -// CrawlerInputItemMapping itemMapping2 = new CrawlerInputItemMapping(); -// itemMapping2.setCrawler(new Crawler((long)1)); -// itemMapping2.setCrawlerInputItem(new CrawlerInputItem((long)1)); -// itemMapping2.setPriority((short) 1); -// itemMapping2.setRequiredType(true); -// -// CrawlerInputItemMapping itemMapping3 = new CrawlerInputItemMapping(); -// itemMapping3.setCrawler(new Crawler((long)1)); -// itemMapping3.setCrawlerInputItem(new CrawlerInputItem((long)2)); -// itemMapping3.setPriority((short) 2); -// itemMapping3.setRequiredType(true); -// -// CrawlerInputItemMapping itemMapping4 = new CrawlerInputItemMapping(); -// itemMapping4.setCrawler(new Crawler((long)1)); -// itemMapping4.setCrawlerInputItem(new CrawlerInputItem((long)3)); -// itemMapping4.setPriority((short) 3); -// itemMapping4.setRequiredType(true); -// -// CrawlerInputItemMapping itemMapping5 = new CrawlerInputItemMapping(); -// itemMapping5.setCrawler(new Crawler((long)2)); -// itemMapping5.setCrawlerInputItem(new CrawlerInputItem((long)1)); -// itemMapping5.setPriority((short) 1); -// itemMapping5.setRequiredType(true); -// -// CrawlerInputItemMapping itemMapping6 = new CrawlerInputItemMapping(); -// itemMapping6.setCrawler(new Crawler((long)2)); -// itemMapping6.setCrawlerInputItem(new CrawlerInputItem((long)2)); -// itemMapping6.setPriority((short) 2); -// itemMapping6.setRequiredType(true); -// -// List crs = new ArrayList(); -// crs.add(itemMapping); -// crs.add(itemMapping1); -// crs.add(itemMapping2); -// crs.add(itemMapping3); -// crs.add(itemMapping4); -// crs.add(itemMapping5); -// crs.add(itemMapping6); -// -// this.mappingDAO.createAll(crs); -// } -// -// @Test -// public void TestFindByCrawlerId() { -// List ls = this.mappingDAO.findByCrawlerId(new Crawler((long)5)); -// System.out.println(ls.size()); -// } -// -//} \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/email/dao/JPAEmailAuthDAOTest.java b/src/test/java/com/loafle/overflow/email/dao/JPAEmailAuthDAOTest.java deleted file mode 100644 index 5a920ef..0000000 --- a/src/test/java/com/loafle/overflow/email/dao/JPAEmailAuthDAOTest.java +++ /dev/null @@ -1,77 +0,0 @@ -//package com.loafle.overflow.email.dao; -// -//import com.loafle.overflow.module.email.dao.JPAEmailAuthDAO; -//import com.loafle.overflow.module.email.model.EmailAuth; -//import com.loafle.overflow.module.member.model.Member; -//import org.junit.Assert; -//import org.junit.Before; -//import org.junit.Ignore; -//import org.junit.Test; -// -//import java.util.Date; -//import java.util.List; -// -///** -// * Created by geek@loafle.com on 17. 6. 6. -// */ -//@Ignore -//public class JPAEmailAuthDAOTest { -// -// private JPAEmailAuthDAO emailAuthDAO = null; -// -// @Before -// public void before() { -// -// this.emailAuthDAO = new JPAEmailAuthDAO(); -// } -// -// @Test -// @Ignore -// public void createEmailAuth() { -// EmailAuth auth = new EmailAuth(); -// -// auth.setAuthToken("0F2003A6-83B0-40F5-B56A-0485F458CA911"); -// auth.setMember(new Member(Long.valueOf(1))); -// auth.setIsInvalid(false); -//// auth.setUpdateDate(new Date()); -// auth.setIsConfirm(false); -// EmailAuth ret = emailAuthDAO.create(auth); -// System.out.println(ret.getId()); -// } -// -// @Test -// @Ignore -// public void updateEmailAuth() { -// EmailAuth auth = this.emailAuthDAO.find("1"); -// -// auth.setIsInvalid(true); -// auth.setUpdateDate(new Date()); -// auth.setConfirmDate(new Date()); -// -// this.emailAuthDAO.update(auth); -// System.out.println(auth.getConfirmDate()); -// } -// -// @Test -// @Ignore -// public void TestFindByAuthToken() { -// EmailAuth auth = new EmailAuth(); -// auth.setAuthToken("3C03F8AB-1D4D-4C8A-8C36-EE2D644988B5"); -// -// EmailAuth temp = this.emailAuthDAO.findByAuthToken(auth); -// -// System.out.println(temp.getId()); -// Assert.assertNotNull(temp); -// } -// -// @Test -// @Ignore -// public void TestFindByMemberId() { -// EmailAuth auth = new EmailAuth(); -// auth.setMember(new Member((long)4)); -// List ems = this.emailAuthDAO.findByMemberId(auth); -// -// System.out.println(ems.get(0).getMember().getEmail()); -// Assert.assertEquals((long)1, (long)ems.size()); -// } -//} \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/infra/dao/JPAInfraDAOTest.java b/src/test/java/com/loafle/overflow/infra/dao/JPAInfraDAOTest.java deleted file mode 100644 index 514bedc..0000000 --- a/src/test/java/com/loafle/overflow/infra/dao/JPAInfraDAOTest.java +++ /dev/null @@ -1,82 +0,0 @@ -//package com.loafle.overflow.infra.dao; -// -//import com.loafle.overflow.AppConfig; -//import com.loafle.overflow.JdbcConfiguration; -//import com.loafle.overflow.meta.dao.MetaInfraTypeDAO; -//import com.loafle.overflow.meta.model.MetaInfraType; -//import com.loafle.overflow.module.infra.dao.InfraDAO; -//import com.loafle.overflow.module.infra.dao.InfraHostDAO; -//import com.loafle.overflow.module.infra.dao.InfraOSDAO; -//import com.loafle.overflow.module.infra.model.Infra; -//import com.loafle.overflow.module.infra.model.InfraHost; -//import com.loafle.overflow.module.infra.model.InfraOS; -//import org.junit.After; -//import org.junit.Before; -//import org.junit.Test; -//import org.junit.runner.RunWith; -//import org.springframework.beans.factory.annotation.Autowired; -//import org.springframework.test.context.ContextConfiguration; -//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -// -//import java.util.Date; -// -//@RunWith(SpringJUnit4ClassRunner.class) -//@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class}) -//public class JPAInfraDAOTest { -// -// @Autowired -// private InfraDAO infraRepo; -// @Autowired -// private MetaInfraTypeDAO infraTypeRepo; -// @Autowired -// private InfraHostDAO infraHostRepo; -// @Autowired -// private InfraOSDAO infraOSRepo; -// -// @Before -// public void setUp() throws Exception { -//// MetaInfraType type1 = new MetaInfraType(); -//// type1.setName("HOST"); -//// type1.setCreateDate(new Date()); -//// -//// MetaInfraType type2 = new MetaInfraType(); -//// type2.setName("MACHINE"); -//// type2.setCreateDate(new Date()); -//// -//// MetaInfraType type3 = new MetaInfraType(); -//// type3.setName("SERVICE"); -//// type3.setCreateDate(new Date()); -//// -//// infraTypeRepo.save(type1); -//// infraTypeRepo.save(type2); -//// infraTypeRepo.save(type3); -//// -//// InfraOS os = new InfraOS(); -//// os.setCreateDate(new Date()); -//// -//// InfraHost host = new InfraHost(); -//// host.setIp(111111); -//// host.setMac(22222222); -//// host.setCreateDate(new Date()); -//// host.setOs(); -//// -//// infraHostRepo.save(host); -// } -// -// @After -// public void tearDown() throws Exception { -// Infra infra = new Infra(); -// infra.setCreateDate(new Date()); -// MetaInfraType t = new MetaInfraType(); -// t.setId(1); -// infra.setType(t); -// infra.setChildId(); -// } -// -// @Test -// public void create() { -// Infra infra = new Infra(); -// } -// -// -//} \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/member/dao/JPAMemberDAOTest.java b/src/test/java/com/loafle/overflow/member/dao/JPAMemberDAOTest.java deleted file mode 100644 index 915e944..0000000 --- a/src/test/java/com/loafle/overflow/member/dao/JPAMemberDAOTest.java +++ /dev/null @@ -1,42 +0,0 @@ -//package com.loafle.overflow.member.dao; -// -//import com.loafle.overflow.module.member.dao.JPAMemberDAO; -//import com.loafle.overflow.module.member.model.Member; -//import org.junit.Before; -//import org.junit.Ignore; -//import org.junit.Test; -// -///** -// * Created by root on 17. 6. 4. -// */ -//@Ignore -//public class JPAMemberDAOTest { -// -// private JPAMemberDAO jpaMemberDAO = null; -// -// @Before -// public void before() { -// -// this.jpaMemberDAO = new JPAMemberDAO(); -// } -// -// @Test -// public void findByEmail() throws Exception { -// } -// -//// @Ignore -// @Test -// public void createMember() { -// Member m = new Member(); -// -// m.setName("geek"); -// m.setCompany("loafle"); -// m.setDigest("bbbbbbbbb"); -// m.setPwSalt("salktttt"); -// m.setPhone("000-000-0000"); -// m.setEmail("geek@loafle.com"); -// -// this.jpaMemberDAO.create(m); -// } -// -//} \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/infra/dao/JPAMetaInfraDAOTest.java b/src/test/java/com/loafle/overflow/module/infra/dao/MetaInfraDAOTest.java similarity index 97% rename from src/test/java/com/loafle/overflow/infra/dao/JPAMetaInfraDAOTest.java rename to src/test/java/com/loafle/overflow/module/infra/dao/MetaInfraDAOTest.java index 7ebb081..d3262ff 100644 --- a/src/test/java/com/loafle/overflow/infra/dao/JPAMetaInfraDAOTest.java +++ b/src/test/java/com/loafle/overflow/module/infra/dao/MetaInfraDAOTest.java @@ -1,4 +1,4 @@ -package com.loafle.overflow.infra.dao; +package com.loafle.overflow.module.infra.dao; import com.loafle.overflow.AppConfig; import com.loafle.overflow.JdbcConfiguration; @@ -8,6 +8,7 @@ import com.loafle.overflow.meta.model.MetaInfraType; import com.loafle.overflow.meta.model.MetaInfraVendor; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -18,9 +19,10 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; +@Ignore @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class}) -public class JPAMetaInfraDAOTest { +public class MetaInfraDAOTest { @Autowired private MetaInfraTypeDAO infraTypeRepo; diff --git a/src/test/java/com/loafle/overflow/target/dao/JPATargetDAOTest.java b/src/test/java/com/loafle/overflow/module/target/dao/TargetDAOTest.java similarity index 89% rename from src/test/java/com/loafle/overflow/target/dao/JPATargetDAOTest.java rename to src/test/java/com/loafle/overflow/module/target/dao/TargetDAOTest.java index 1e7921f..33f6bc9 100644 --- a/src/test/java/com/loafle/overflow/target/dao/JPATargetDAOTest.java +++ b/src/test/java/com/loafle/overflow/module/target/dao/TargetDAOTest.java @@ -1,11 +1,11 @@ -package com.loafle.overflow.target.dao; +package com.loafle.overflow.module.target.dao; import com.loafle.overflow.AppConfig; import com.loafle.overflow.JdbcConfiguration; import com.loafle.overflow.module.infra.model.Infra; import com.loafle.overflow.module.probe.model.Probe; -import com.loafle.overflow.module.target.dao.TargetDAO; import com.loafle.overflow.module.target.model.Target; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -15,9 +15,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import java.sql.Timestamp; import java.util.Date; +@Ignore @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class}) -public class JPATargetDAOTest { +public class TargetDAOTest { @Autowired private TargetDAO repo; diff --git a/src/test/java/com/loafle/overflow/sensor/dao/JPASensorDaoTest.java b/src/test/java/com/loafle/overflow/sensor/dao/JPASensorDaoTest.java deleted file mode 100644 index c6bb3df..0000000 --- a/src/test/java/com/loafle/overflow/sensor/dao/JPASensorDaoTest.java +++ /dev/null @@ -1,55 +0,0 @@ -//package com.loafle.overflow.sensor.dao; -// -//import com.loafle.overflow.module.crawler.model.Crawler; -//import com.loafle.overflow.module.sensor.dao.JPASensorDao; -//import com.loafle.overflow.module.sensor.dao.SensorDao; -//import org.junit.Before; -//import org.junit.Ignore; -//import org.junit.Test; -// -///** -// * Created by root on 17. 6. 9. -// */ -//public class JPASensorDaoTest { -// -// private SensorDao sensorDao = null; -// -// @Before -// public void before() { -// this.sensorDao = new JPASensorDao(); -// } -// -// @Test -// public void findAllByAgentID() throws Exception { -// } -// -// -// @Ignore -// @Test -// public void create() { -// -// -// Sensor sensor = new Sensor(); -// -// Crawler crawler = new Crawler(); -// crawler.setId(1L); -// -// Target target = new Target(); -// target.setId(1L); -// -// sensor.setCrawler(crawler); -// sensor.setInterval(1); -// sensor.setNotification("nothing"); -// sensor.setTarget(target); -// -// this.sensorDao.create(sensor); -// -// } -// -// @Test -// public void list() { -// -//// this.sensorDao.findAllByAgentID() -// } -// -//} \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemCategoryDaoTest.java b/src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemCategoryDaoTest.java deleted file mode 100644 index 7e77725..0000000 --- a/src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemCategoryDaoTest.java +++ /dev/null @@ -1,36 +0,0 @@ -//package com.loafle.overflow.sensor.dao; -// -//import com.loafle.overflow.module.sensor.dao.JPASensorItemCategoryDao; -//import com.loafle.overflow.module.sensor.dao.SensorItemCategoryDao; -//import org.junit.Before; -//import org.junit.Ignore; -//import org.junit.Test; -// -///** -// * Created by root on 17. 6. 9. -// */ -//public class JPASensorItemCategoryDaoTest { -// -// private SensorItemCategoryDao sensorItemCategoryDao = null; -// -// @Before -// public void before() { -// -// this.sensorItemCategoryDao = new JPASensorItemCategoryDao(); -// } -// -// -// @Ignore -// @Test -// public void create() { -// -// SensorItemCategory sensorItemCategory = new SensorItemCategory(); -// -// sensorItemCategory.setName("count"); -// sensorItemCategory.setDescription("count !!!!"); -// -// this.sensorItemCategoryDao.create(sensorItemCategory); -// -// } -// -//} \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemDaoTest.java b/src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemDaoTest.java deleted file mode 100644 index 09f640e..0000000 --- a/src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemDaoTest.java +++ /dev/null @@ -1,61 +0,0 @@ -//package com.loafle.overflow.sensor.dao; -// -//import com.loafle.overflow.module.crawler.model.Crawler; -//import com.loafle.overflow.module.sensor.dao.JPASensorItemDao; -//import com.loafle.overflow.module.sensor.dao.SensorItemDao; -//import org.junit.Before; -//import org.junit.Ignore; -//import org.junit.Test; -// -//import java.util.List; -// -///** -// * Created by root on 17. 6. 9. -// */ -//public class JPASensorItemDaoTest { -// -// private SensorItemDao sensorItemDao = null; -// -// @Before -// public void before() { -// this.sensorItemDao = new JPASensorItemDao(); -// } -// -// @Ignore -// @Test -// public void create() { -// -// -// SensorItem sensorItem = new SensorItem(); -// -// Crawler crawler = new Crawler(); -// crawler.setId(1L); -// -// SensorItemCategory category = new SensorItemCategory(); -// category.setId(1L); -// -// sensorItem.setCrawler(crawler); -// sensorItem.setDataType("int"); -// sensorItem.setDescription("count getget"); -// sensorItem.setName("net.mysql.connection_count"); -// sensorItem.setSensorItemCategory(category); -// -// this.sensorItemDao.create(sensorItem); -// -// } -// -// @Ignore -// @Test -// public void list() { -// -// Crawler crawler = new Crawler(); -// crawler.setId(1L); -// -// List is = this.sensorItemDao.findAllByCrawlerId(crawler); -// -// -// System.out.println(is.size()); -// -// } -// -//} \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemMappingDaoTest.java b/src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemMappingDaoTest.java deleted file mode 100644 index be7552d..0000000 --- a/src/test/java/com/loafle/overflow/sensor/dao/JPASensorItemMappingDaoTest.java +++ /dev/null @@ -1,59 +0,0 @@ -//package com.loafle.overflow.sensor.dao; -// -//import com.loafle.overflow.module.sensor.dao.JPASensorItemMappingDao; -//import com.loafle.overflow.module.sensor.dao.SensorItemMappingDao; -//import org.junit.Before; -//import org.junit.Ignore; -//import org.junit.Test; -// -//import java.util.List; -// -///** -// * Created by root on 17. 6. 9. -// */ -//public class JPASensorItemMappingDaoTest { -// -// private SensorItemMappingDao sensorItemMappingDao = null; -// -// @Before -// public void before() { -// this.sensorItemMappingDao = new JPASensorItemMappingDao(); -// } -// -// -// @Ignore -// @Test -// public void create() { -// -// SensorItemMapping mapping = new SensorItemMapping(); -// -// Sensor sensor = new Sensor(); -// -// sensor.setId(1L); -// -// SensorItem sensorItem = new SensorItem(); -// -// sensorItem.setId(1L); -// -// mapping.setSensor(sensor); -// -// mapping.setSensorItem(sensorItem); -// -// this.sensorItemMappingDao.create(mapping); -// -// } -// -// @Test -// public void list() { -// -// Sensor sensor = new Sensor(); -// -// sensor.setId(1L); -// -// List ml = this.sensorItemMappingDao.findAllBySensorId(sensor); -// -// System.out.println(ml.size()); -// -// } -// -//} \ No newline at end of file