From 82c35d8c8fd86755db5a7dbd889b5b83550cd1a8 Mon Sep 17 00:00:00 2001 From: snoop Date: Wed, 7 Jun 2017 20:15:45 +0900 Subject: [PATCH] added test list --- .../overflow/target/dao/JPATargetDaoTest.java | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/test/java/com/loafle/overflow/target/dao/JPATargetDaoTest.java b/src/test/java/com/loafle/overflow/target/dao/JPATargetDaoTest.java index 2929ffc..6118d45 100644 --- a/src/test/java/com/loafle/overflow/target/dao/JPATargetDaoTest.java +++ b/src/test/java/com/loafle/overflow/target/dao/JPATargetDaoTest.java @@ -8,6 +8,7 @@ import org.junit.Before; import org.junit.Ignore; import org.junit.Test; +import java.util.ArrayList; import java.util.List; import static org.junit.Assert.*; @@ -30,6 +31,14 @@ public class JPATargetDaoTest { @Test public void testCreate() { + Target target = CreateTarget(); + + this.jpaTargetDao.create(target); + + } + + public Target CreateTarget() { + Target target = new Target(); @@ -46,7 +55,7 @@ public class JPATargetDaoTest { target.setMember(member); - this.jpaTargetDao.create(target); + return target; } @@ -65,5 +74,23 @@ public class JPATargetDaoTest { } + @Test + public void createList() { + + List targets = new ArrayList<>(); + + targets.add(CreateTarget()); + targets.add(CreateTarget()); + targets.add(CreateTarget()); + targets.add(CreateTarget()); + targets.add(CreateTarget()); + targets.add(CreateTarget()); + + + this.jpaTargetDao.createAll(targets); + + + } + } \ No newline at end of file