History ing
This commit is contained in:
parent
8d3ed4924d
commit
a70ac34ef6
|
@ -13,6 +13,14 @@ public class MetaHistoryType {
|
||||||
private String name;
|
private String name;
|
||||||
private Date createDate;
|
private Date createDate;
|
||||||
|
|
||||||
|
public MetaHistoryType() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public MetaHistoryType(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return id;
|
return id;
|
||||||
|
|
|
@ -29,6 +29,14 @@ public class Probe {
|
||||||
private Member authorizeMember;
|
private Member authorizeMember;
|
||||||
// private InfraHost host;
|
// private InfraHost host;
|
||||||
|
|
||||||
|
public Probe() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Probe(long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
@GeneratedValue(strategy= GenerationType.IDENTITY)
|
||||||
public long getId() {
|
public long getId() {
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.loafle.overflow.module.history.service;
|
||||||
|
|
||||||
|
import com.loafle.overflow.module.history.model.History;
|
||||||
|
import com.loafle.overflow.module.member.model.Member;
|
||||||
|
import com.loafle.overflow.module.probe.model.Probe;
|
||||||
|
import com.loafle.overflow.spring.AppConfigTest;
|
||||||
|
import org.junit.Ignore;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by insanity on 17. 8. 23.
|
||||||
|
*/
|
||||||
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
|
@ContextConfiguration(classes = {AppConfigTest.class})
|
||||||
|
public class HistoryServiceTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private HistoryService historyService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Ignore
|
||||||
|
public void registHistories() {
|
||||||
|
for (int i=0;i<600;i++) {
|
||||||
|
History h = new History();
|
||||||
|
h.setMember(new Member(1));
|
||||||
|
h.setProbe(new Probe(1));
|
||||||
|
//h.setType(new MetaHistoryType(typeId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,15 +18,16 @@ import java.util.List;
|
||||||
*/
|
*/
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@ContextConfiguration(classes = {AppConfigTest.class})
|
@ContextConfiguration(classes = {AppConfigTest.class})
|
||||||
|
@Ignore
|
||||||
public class MetaHistoryTypeServiceTest {
|
public class MetaHistoryTypeServiceTest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MetaHistoryTypeService historyTypeService;
|
private MetaHistoryTypeService historyTypeService;
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Ignore
|
|
||||||
public void readAll() throws Exception {
|
public void readAll() throws Exception {
|
||||||
List<MetaHistoryType> historyTypes = this.historyTypeService.readAll();
|
List<MetaHistoryType> historyTypes = this.historyTypeService.readAll();
|
||||||
|
Assert.assertNotNull(historyTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.loafle.overflow.module.meta.service;
|
||||||
import com.loafle.overflow.module.meta.model.MetaInfraType;
|
import com.loafle.overflow.module.meta.model.MetaInfraType;
|
||||||
import com.loafle.overflow.spring.AppConfigTest;
|
import com.loafle.overflow.spring.AppConfigTest;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
|
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;
|
||||||
|
@ -11,13 +12,12 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by snoop on 17. 7. 27.
|
* Created by snoop on 17. 7. 27.
|
||||||
*/
|
*/
|
||||||
@RunWith(SpringJUnit4ClassRunner.class)
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
@ContextConfiguration(classes = {AppConfigTest.class})
|
@ContextConfiguration(classes = {AppConfigTest.class})
|
||||||
|
@Ignore
|
||||||
public class MetaInfraTypeServiceTest {
|
public class MetaInfraTypeServiceTest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
Loading…
Reference in New Issue
Block a user