added
test env
This commit is contained in:
parent
25406a261b
commit
e03f5bc853
7
pom.xml
7
pom.xml
|
@ -27,6 +27,13 @@
|
|||
<artifactId>overflow_member</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>9.4-1200-jdbc41</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -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);
|
||||
|
||||
|
||||
}
|
||||
}
|
17
src/test/resources/META-INF/persistence.xml
Normal file
17
src/test/resources/META-INF/persistence.xml
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<persistence version="2.1" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
|
||||
|
||||
<persistence-unit name="overflow">
|
||||
<class>com.loafle.overflow.member.model.Member</class>
|
||||
<properties>
|
||||
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://192.168.1.106:5432/postgres" />
|
||||
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver" />
|
||||
<property name="javax.persistence.jdbc.user" value="vertx" />
|
||||
<property name="javax.persistence.jdbc.password" value="qwe123" />
|
||||
<!--<property name="hibernate.hbm2ddl.auto" value="create-drop"/>-->
|
||||
<property name="hibernate.show_sql" value="true" />
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
</persistence>
|
Loading…
Reference in New Issue
Block a user