From e03f5bc8531d2d02280d6695670a9bd995ea3f6c Mon Sep 17 00:00:00 2001 From: snoop Date: Fri, 2 Jun 2017 13:01:39 +0900 Subject: [PATCH] added test env --- pom.xml | 7 +++++++ src/test/java/com/loafle/AppTest.java | 18 +++++++++++++++++- src/test/resources/META-INF/persistence.xml | 17 +++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 src/test/resources/META-INF/persistence.xml diff --git a/pom.xml b/pom.xml index a3c8278..a019eff 100644 --- a/pom.xml +++ b/pom.xml @@ -27,6 +27,13 @@ overflow_member 1.0.0-SNAPSHOT + + + org.postgresql + postgresql + 9.4-1200-jdbc41 + test + \ No newline at end of file diff --git a/src/test/java/com/loafle/AppTest.java b/src/test/java/com/loafle/AppTest.java index 15c2fbc..765ada9 100644 --- a/src/test/java/com/loafle/AppTest.java +++ b/src/test/java/com/loafle/AppTest.java @@ -2,6 +2,8 @@ package com.loafle; import static org.junit.Assert.*; +import com.loafle.overflow.member.dao.JPAMemberDAO; +import com.loafle.overflow.member.model.Member; import org.junit.Ignore; import org.junit.Test; @@ -9,6 +11,20 @@ import org.junit.Test; public class AppTest { @Test public void testSum() { - fail("Not yet implemented"); + Member m = new Member(); + + m.setName("insanity2"); + m.setCompany("loafle"); + m.setDigest("bbbbbbbbb"); + m.setPwSalt("salktttt"); + m.setPhone("000-000-0000"); + m.setEmail("insanity22@loafle.com"); + + + JPAMemberDAO jpaMemberDAO = new JPAMemberDAO(); + + jpaMemberDAO.create(m); + + } } \ No newline at end of file diff --git a/src/test/resources/META-INF/persistence.xml b/src/test/resources/META-INF/persistence.xml new file mode 100644 index 0000000..3820fce --- /dev/null +++ b/src/test/resources/META-INF/persistence.xml @@ -0,0 +1,17 @@ + + + + + com.loafle.overflow.member.model.Member + + + + + + + + + + + \ No newline at end of file