diff --git a/src/main/java/com/loafle/overflow/module/meta/model/MetaHistoryType.java b/src/main/java/com/loafle/overflow/module/meta/model/MetaHistoryType.java index c605597..d619f79 100644 --- a/src/main/java/com/loafle/overflow/module/meta/model/MetaHistoryType.java +++ b/src/main/java/com/loafle/overflow/module/meta/model/MetaHistoryType.java @@ -13,6 +13,14 @@ public class MetaHistoryType { private String name; private Date createDate; + public MetaHistoryType() { + + } + + public MetaHistoryType(int id) { + this.id = id; + } + @Id public int getId() { return id; diff --git a/src/main/java/com/loafle/overflow/module/probe/model/Probe.java b/src/main/java/com/loafle/overflow/module/probe/model/Probe.java index fc70d18..9a77877 100644 --- a/src/main/java/com/loafle/overflow/module/probe/model/Probe.java +++ b/src/main/java/com/loafle/overflow/module/probe/model/Probe.java @@ -29,6 +29,14 @@ public class Probe { private Member authorizeMember; // private InfraHost host; + public Probe() { + + } + + public Probe(long id) { + this.id = id; + } + @Id @GeneratedValue(strategy= GenerationType.IDENTITY) public long getId() { diff --git a/src/test/java/com/loafle/overflow/module/history/service/HistoryServiceTest.java b/src/test/java/com/loafle/overflow/module/history/service/HistoryServiceTest.java new file mode 100644 index 0000000..611876c --- /dev/null +++ b/src/test/java/com/loafle/overflow/module/history/service/HistoryServiceTest.java @@ -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)); + } + } +} diff --git a/src/test/java/com/loafle/overflow/module/meta/service/MetaHistoryTypeServiceTest.java b/src/test/java/com/loafle/overflow/module/meta/service/MetaHistoryTypeServiceTest.java index fcc3e9d..df6ddb5 100644 --- a/src/test/java/com/loafle/overflow/module/meta/service/MetaHistoryTypeServiceTest.java +++ b/src/test/java/com/loafle/overflow/module/meta/service/MetaHistoryTypeServiceTest.java @@ -18,15 +18,16 @@ import java.util.List; */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = {AppConfigTest.class}) +@Ignore public class MetaHistoryTypeServiceTest { @Autowired private MetaHistoryTypeService historyTypeService; @Test - @Ignore public void readAll() throws Exception { List historyTypes = this.historyTypeService.readAll(); + Assert.assertNotNull(historyTypes); } @Test diff --git a/src/test/java/com/loafle/overflow/module/meta/service/MetaInfraTypeServiceTest.java b/src/test/java/com/loafle/overflow/module/meta/service/MetaInfraTypeServiceTest.java index 5e4d1f0..e89b06a 100644 --- a/src/test/java/com/loafle/overflow/module/meta/service/MetaInfraTypeServiceTest.java +++ b/src/test/java/com/loafle/overflow/module/meta/service/MetaInfraTypeServiceTest.java @@ -3,6 +3,7 @@ package com.loafle.overflow.module.meta.service; import com.loafle.overflow.module.meta.model.MetaInfraType; import com.loafle.overflow.spring.AppConfigTest; import org.junit.Assert; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -11,13 +12,12 @@ 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 = {AppConfigTest.class}) +@Ignore public class MetaInfraTypeServiceTest { @Autowired