added ignore
This commit is contained in:
parent
3c33a76228
commit
4c499923d3
|
@ -5,6 +5,8 @@ import com.loafle.overflow.module.sensor.model.Sensor;
|
||||||
import com.loafle.overflow.module.sensor.model.SensorItem;
|
import com.loafle.overflow.module.sensor.model.SensorItem;
|
||||||
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.codehaus.jackson.map.ObjectMapper;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -13,14 +15,16 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.test.context.ContextConfiguration;
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by insanity on 17. 6. 28.
|
* Created by insanity on 17. 6. 28.
|
||||||
*/
|
*/
|
||||||
@Ignore
|
@Ignore
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class})
|
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class, MailConfiguration.class})
|
||||||
public class SensorItemServiceTest {
|
public class SensorItemServiceTest {
|
||||||
@Autowired
|
@Autowired
|
||||||
SensorItemService sensorItemService;
|
SensorItemService sensorItemService;
|
||||||
|
@ -45,4 +49,15 @@ public class SensorItemServiceTest {
|
||||||
SensorItem res = this.sensorItemService.read("1");
|
SensorItem res = this.sensorItemService.read("1");
|
||||||
Assert.assertNotNull(res);
|
Assert.assertNotNull(res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void readAllBySensor() throws IOException {
|
||||||
|
Sensor sensor = new Sensor();
|
||||||
|
sensor.setId(1);
|
||||||
|
List<SensorItem> sensorItems = this.sensorItemService.readAllBySensor(sensor);
|
||||||
|
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
String json = objectMapper.writeValueAsString(sensorItems);
|
||||||
|
System.out.println(json);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,12 @@ public class SensorServiceTest {
|
||||||
public void read() throws Exception {
|
public void read() throws Exception {
|
||||||
Sensor res = this.sensorService.read("1");
|
Sensor res = this.sensorService.read("1");
|
||||||
Assert.assertNotNull(res);
|
Assert.assertNotNull(res);
|
||||||
|
|
||||||
|
ObjectMapper objectMapper = new ObjectMapper();
|
||||||
|
|
||||||
|
String json = objectMapper.writeValueAsString(res);
|
||||||
|
|
||||||
|
System.out.println(json);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue
Block a user