diff --git a/src/test/java/com/loafle/overflow/module/member/dao/MemberDAOTest.java b/src/test/java/com/loafle/overflow/module/member/dao/MemberDAOTest.java index 97abf32..64df8cd 100644 --- a/src/test/java/com/loafle/overflow/module/member/dao/MemberDAOTest.java +++ b/src/test/java/com/loafle/overflow/module/member/dao/MemberDAOTest.java @@ -8,6 +8,7 @@ import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -29,13 +30,14 @@ public class MemberDAOTest { @Test public void createMember() { Member m = new Member(); - + BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); m.setName("insanity2"); m.setCompanyName("loafle"); - m.setPw("bbbbbbbbb"); + m.setPw(passwordEncoder.encode("!@#$qwer1234")); +// m.setPw("!@#$qwer1234"); m.setPhone("000-000-0000"); - m.setEmail("insanity1112@loafle.com"); - m.setStatus(new MetaMemberStatus((short)3)); + m.setEmail("geekhot@hotmail.co.kr"); + m.setStatus(new MetaMemberStatus((short)1)); repo.save(m); Assert.assertNotEquals(m.getId(), 0); @@ -47,7 +49,8 @@ public class MemberDAOTest { member.setEmail("overflow@loafle.com"); Member rr = repo.findByEmail("overflow@loafle.com"); - System.out.println("rr.getCompanyName() = " + rr.getCompanyName()); + Assert.assertNotNull(rr); +// System.out.println("rr.getCompanyName() = " + rr.getCompanyName()); } } \ No newline at end of file diff --git a/src/test/java/com/loafle/overflow/module/member/service/MemberServiceTest.java b/src/test/java/com/loafle/overflow/module/member/service/MemberServiceTest.java index 649b296..0800be0 100644 --- a/src/test/java/com/loafle/overflow/module/member/service/MemberServiceTest.java +++ b/src/test/java/com/loafle/overflow/module/member/service/MemberServiceTest.java @@ -17,7 +17,7 @@ import java.util.Date; /** * Created by insanity on 17. 6. 28. */ -//@Ignore +@Ignore @RunWith(SpringJUnit4ClassRunner.class) @ActiveProfiles("test") @ContextConfiguration(classes = {AppConfigTest.class}) @@ -33,7 +33,7 @@ public class MemberServiceTest { m.setStatus(new MetaMemberStatus((short)1)); m.setCreateDate(new Date()); m.setCompanyName("Loafle"); - m.setEmail("admin@loafle.com"); + m.setEmail("geekhot@hotmail.co.kr"); m.setName("administrator"); m.setPhone("00000000");