added meta
This commit is contained in:
parent
6020c1e853
commit
7924236c08
|
@ -0,0 +1,22 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
import com.loafle.overflow.module.meta.dao.MetaCrawlerDAO;
|
||||
import com.loafle.overflow.module.meta.model.MetaCrawler;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
@Service("MetaCrawlerService")
|
||||
public class MetaCrawlerService {
|
||||
|
||||
@Autowired
|
||||
private MetaCrawlerDAO crawlerDAO;
|
||||
|
||||
List<MetaCrawler> readAll() {
|
||||
return this.crawlerDAO.findAll();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
import com.loafle.overflow.module.meta.dao.MetaSensorItemTypeDAO;
|
||||
import com.loafle.overflow.module.meta.model.MetaSensorItemType;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
@Service("MetaSensorItemTypeService")
|
||||
public class MetaSensorItemTypeService {
|
||||
|
||||
@Autowired
|
||||
private MetaSensorItemTypeDAO sensorItemTypeDAO;
|
||||
|
||||
public List<MetaSensorItemType> readAll() {
|
||||
return this.sensorItemTypeDAO.findAll();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaCrawler;
|
||||
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.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.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class, MailConfiguration.class})
|
||||
public class MetaCrawlerServiceTest {
|
||||
|
||||
@Autowired
|
||||
private MetaCrawlerService service;
|
||||
|
||||
@Test
|
||||
public void readAll() throws Exception {
|
||||
List<MetaCrawler> metaCrawlerServices = this.service.readAll();
|
||||
|
||||
Assert.assertNotEquals(metaCrawlerServices.size(), 0);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.loafle.overflow.module.meta.service;
|
||||
|
||||
import com.loafle.overflow.module.meta.model.MetaSensorItemType;
|
||||
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.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.List;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Created by snoop on 17. 7. 27.
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class, MailConfiguration.class})
|
||||
public class MetaSensorItemTypeServiceTest {
|
||||
|
||||
@Autowired
|
||||
private MetaSensorItemTypeService sensorItemTypeService;
|
||||
|
||||
@Test
|
||||
public void readAll() throws Exception {
|
||||
List<MetaSensorItemType> metaSensorItemTypes = this.sensorItemTypeService.readAll();
|
||||
|
||||
Assert.assertNotEquals(metaSensorItemTypes.size(), 0);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user