| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- package com.ym;
- import com.ym.mec.biz.dal.dto.ClassDateAdjustDto;
- import com.ym.mec.biz.dal.entity.CourseSchedule;
- import org.apache.commons.lang.StringUtils;
- import org.springframework.beans.BeanUtils;
- import java.io.File;
- import java.io.IOException;
- import java.util.ArrayList;
- import java.util.Date;
- import java.util.HashSet;
- import java.util.List;
- /**
- * @Author Joburgess
- * @Date 2019/9/24
- */
- public class Test {
- @org.junit.Test
- public void test1(){
- ClassDateAdjustDto temp=new ClassDateAdjustDto();
- temp.setClassDate(new Date());
- temp.setWeekNum(1);
- temp.setId(1L);
- CourseSchedule courseSchedule=new CourseSchedule();
- // courseSchedule=temp;
- BeanUtils.copyProperties(temp,courseSchedule);
- courseSchedule.setId(2L);
- System.out.println(courseSchedule.getId());
- }
- @org.junit.Test
- public void test2() throws IOException {
- System.out.println(System.getProperty("java.io.tmpdir"));
- File file=new File("E:\test.txt");
- file.createNewFile();
- }
- @org.junit.Test
- public void test3(){
- List<Integer> list=new ArrayList<>();
- list.add(1);
- list.add(2);
- list.add(3);
- list.add(1);
- HashSet<Integer> hashSet=new HashSet<>(list);
- String join = StringUtils.join(hashSet, ",");
- System.out.println(join);
- }
- }
|