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