added meta

This commit is contained in:
snoop 2017-07-27 16:51:41 +09:00
parent 7924236c08
commit b4323c6ea9
6 changed files with 181 additions and 0 deletions

View File

@ -0,0 +1,22 @@
package com.loafle.overflow.module.meta.service;
import com.loafle.overflow.module.meta.dao.MetaProbeVersionDAO;
import com.loafle.overflow.module.meta.model.MetaProbeVersion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Created by snoop on 17. 7. 27.
*/
@Service("MetaProbeVersionService")
public class MetaProbeVersionService {
@Autowired
private MetaProbeVersionDAO probeVersionDAO;
public List<MetaProbeVersion> readAll() {
return this.probeVersionDAO.findAll();
}
}

View File

@ -0,0 +1,24 @@
package com.loafle.overflow.module.meta.service;
import com.loafle.overflow.module.meta.dao.MetaSensorItemDAO;
import com.loafle.overflow.module.meta.model.MetaSensorItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Created by snoop on 17. 7. 27.
*/
@Service("MetaSensorItemService")
public class MetaSensorItemService {
@Autowired
private MetaSensorItemDAO metaSensorItemDAO;
public List<MetaSensorItem> readAll() {
return this.metaSensorItemDAO.findAll();
}
}

View File

@ -0,0 +1,23 @@
package com.loafle.overflow.module.meta.service;
import com.loafle.overflow.module.meta.dao.MetaSensorStatusDAO;
import com.loafle.overflow.module.meta.model.MetaSensorStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* Created by snoop on 17. 7. 27.
*/
@Service("MetaSensorStatusService")
public class MetaSensorStatusService {
@Autowired
private MetaSensorStatusDAO sensorStatusDAO;
List<MetaSensorStatus> readAll() {
return this.sensorStatusDAO.findAll();
}
}

View File

@ -0,0 +1,38 @@
package com.loafle.overflow.module.meta.service;
import com.loafle.overflow.module.meta.model.MetaProbeVersion;
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 MetaProbeVersionServiceTest {
@Autowired
private MetaProbeVersionService probeVersionService;
@Test
public void readAll() throws Exception {
List<MetaProbeVersion> probeVersionList = this.probeVersionService.readAll();
Assert.assertNotEquals(probeVersionList.size(), 0);
}
}

View File

@ -0,0 +1,37 @@
package com.loafle.overflow.module.meta.service;
import com.loafle.overflow.module.meta.model.MetaSensorItem;
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 MetaSensorItemServiceTest {
@Autowired
private MetaSensorItemService metaSensorItemService;
@Test
public void readAll() throws Exception {
List<MetaSensorItem> metaSensorItems = this.metaSensorItemService.readAll();
Assert.assertNotEquals(metaSensorItems.size(), 0);
}
}

View File

@ -0,0 +1,37 @@
package com.loafle.overflow.module.meta.service;
import com.loafle.overflow.module.meta.model.MetaSensorStatus;
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 MetaSensorStatusServiceTest {
@Autowired
private MetaSensorStatusService sensorStatusService;
@Test
public void readAll() throws Exception {
List<MetaSensorStatus> sensorStatuses = this.sensorStatusService.readAll();
Assert.assertNotEquals(sensorStatuses.size(), 0);
}
}