added DAO
Domain DomainMember
This commit is contained in:
parent
6093366631
commit
ef99503f91
|
@ -0,0 +1,39 @@
|
||||||
|
package com.loafle.overflow.module.domain.dao;
|
||||||
|
|
||||||
|
import com.loafle.overflow.AppConfig;
|
||||||
|
import com.loafle.overflow.JdbcConfiguration;
|
||||||
|
import com.loafle.overflow.module.domain.Domain;
|
||||||
|
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;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by root on 17. 6. 23.
|
||||||
|
*/
|
||||||
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
|
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class})
|
||||||
|
public class DomainDAOTest {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DomainDAO domainDAO;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreate() {
|
||||||
|
|
||||||
|
Domain domain = new Domain();
|
||||||
|
|
||||||
|
domain.setCreateDate(new Date());
|
||||||
|
domain.setName("snoop's domain");
|
||||||
|
|
||||||
|
this.domainDAO.save(domain);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
package com.loafle.overflow.module.domain.dao;
|
||||||
|
|
||||||
|
import com.loafle.overflow.AppConfig;
|
||||||
|
import com.loafle.overflow.JdbcConfiguration;
|
||||||
|
import com.loafle.overflow.module.domain.DomainMember;
|
||||||
|
import org.junit.Test;
|
||||||
|
import org.junit.runner.RunWith;
|
||||||
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by root on 17. 6. 23.
|
||||||
|
*/
|
||||||
|
@RunWith(SpringJUnit4ClassRunner.class)
|
||||||
|
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class})
|
||||||
|
public class DomainMemberDAOTest {
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testCreate() {
|
||||||
|
|
||||||
|
DomainMember domainMember = new DomainMember();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user