Package test.user

Source Code of test.user.TestPersonalInfo

package test.user;

import java.net.URL;
import java.util.Date;

import org.apache.log4j.PropertyConfigurator;
import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.skyline.user.model.User;
import com.skyline.user.service.PersonalInfoService;
import com.skyline.user.type.Sex;

public class TestPersonalInfo {
  private static PersonalInfoService service;

  static {
    URL url = TestPersonalInfo.class.getClassLoader().getResource("config/logger/log4j.properties");
    PropertyConfigurator.configure(url);
  }
 
  @BeforeClass
  public static void before() {
    ApplicationContext ctx = new ClassPathXmlApplicationContext(
        "config/context/applicationContext.xml");
    service = (PersonalInfoService) ctx.getBean("personalInfoService");
  }

  //@Test
  public void testModeifyBasicInfo() {
    service.modifyBasicInfo(Long.valueOf(4), "name", "nickName1", new Date(), Sex.MALE,
        "浙江", "杭州", "中国", "学生", "浙大", null);
  }
 
 
  public void testModeifyComInfo() {
    service.modifyCommunicationInfo(Long.valueOf(4), "mobilephone","msn", "qq");//.modifyBasicInfo(1, "name", "nickName1", new Date(), Sex.male,
        //"浙江", "杭州", "中国", "学生", "浙大");
  }
 
 
  @Test
  public void testQueryPersonInfoByUserID() {
    User user = service.getPersonInfoByUserID(Long.valueOf(4));
    if (user != null) {
      System.out.println(user.getName());
      System.out.println(user.getNickname());
      System.out.println(user.getEmail());
      System.out.println(user.getCity());
      System.out.println(user.getProvince());
      System.out.println(user.getCountry());
      System.out.println(user.getSiteId());
      System.out.println(user.getSex());
      System.out.println(user.getGraduateSchool());
      System.out.println(user.getJob());
      System.out.println(user.getMobilephone());
      System.out.println(user.getMsn());
      System.out.print(user.getQq());
    }
  }
 
 


 

}
TOP

Related Classes of test.user.TestPersonalInfo

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.