old test classes had remove.

This commit is contained in:
insanity 2017-06-26 11:58:26 +09:00
parent bdc79b2b52
commit d205de4546
16 changed files with 11 additions and 741 deletions

View File

@ -3,7 +3,6 @@ package com.loafle.overflow.module.target.dao;
import com.loafle.overflow.module.probe.model.Probe; import com.loafle.overflow.module.probe.model.Probe;
import com.loafle.overflow.module.target.model.Target; import com.loafle.overflow.module.target.model.Target;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import java.util.List; import java.util.List;
@ -12,6 +11,5 @@ import java.util.List;
* Created by root on 17. 6. 5. * Created by root on 17. 6. 5.
*/ */
public interface TargetDAO extends JpaRepository<Target, Long> { public interface TargetDAO extends JpaRepository<Target, Long> {
// @Query("SELECT m FROM TARGET m WHERE m.probeId = :probeId") List<Target> findAllByProbe(Probe probe);
// List<Target> findAllByProbe(Probe probe);
} }

View File

@ -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.username=overflow
spring.datasource.password=qwer5795 spring.datasource.password=qwer5795
spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect spring.jpa.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.database=postgresql 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.ddl-auto=update
spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.show-sql=true spring.jpa.show-sql=true

View File

@ -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());
// }
//
//}

View File

@ -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);
// }
//
//}

View File

@ -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<Crawler> crawlers = new ArrayList<Crawler>();
//
// 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<Crawler> ls = this.jpaCrawlerDAO.findAll();
// System.out.println(ls.size());
// }
// // TODO Crawler Update Test
//
// // TODO Crawler Delete Test
//}

View File

@ -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<CrawlerInputItem> cris = new ArrayList<CrawlerInputItem>();
//
// 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);
// }
//}

View File

@ -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<CrawlerInputItemMapping> crs = new ArrayList<CrawlerInputItemMapping>();
// 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<CrawlerInputItemMapping> ls = this.mappingDAO.findByCrawlerId(new Crawler((long)5));
// System.out.println(ls.size());
// }
//
//}

View File

@ -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<EmailAuth> ems = this.emailAuthDAO.findByMemberId(auth);
//
// System.out.println(ems.get(0).getMember().getEmail());
// Assert.assertEquals((long)1, (long)ems.size());
// }
//}

View File

@ -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();
// }
//
//
//}

View File

@ -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);
// }
//
//}

View File

@ -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.AppConfig;
import com.loafle.overflow.JdbcConfiguration; import com.loafle.overflow.JdbcConfiguration;
@ -8,6 +8,7 @@ import com.loafle.overflow.meta.model.MetaInfraType;
import com.loafle.overflow.meta.model.MetaInfraVendor; import com.loafle.overflow.meta.model.MetaInfraVendor;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -18,9 +19,10 @@ import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@Ignore
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class}) @ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class})
public class JPAMetaInfraDAOTest { public class MetaInfraDAOTest {
@Autowired @Autowired
private MetaInfraTypeDAO infraTypeRepo; private MetaInfraTypeDAO infraTypeRepo;

View File

@ -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.AppConfig;
import com.loafle.overflow.JdbcConfiguration; import com.loafle.overflow.JdbcConfiguration;
import com.loafle.overflow.module.infra.model.Infra; import com.loafle.overflow.module.infra.model.Infra;
import com.loafle.overflow.module.probe.model.Probe; 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 com.loafle.overflow.module.target.model.Target;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -15,9 +15,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.Date; import java.util.Date;
@Ignore
@RunWith(SpringJUnit4ClassRunner.class) @RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class}) @ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class})
public class JPATargetDAOTest { public class TargetDAOTest {
@Autowired @Autowired
private TargetDAO repo; private TargetDAO repo;

View File

@ -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()
// }
//
//}

View File

@ -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);
//
// }
//
//}

View File

@ -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<SensorItem> is = this.sensorItemDao.findAllByCrawlerId(crawler);
//
//
// System.out.println(is.size());
//
// }
//
//}

View File

@ -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<SensorItemMapping> ml = this.sensorItemMappingDao.findAllBySensorId(sensor);
//
// System.out.println(ml.size());
//
// }
//
//}