diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..267c321 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# 项目排除路径 +/out/ \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..6ac1cc3 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# 基于编辑器的 HTTP 客户端请求 +/httpRequests/ diff --git a/.idea/artifacts/chengyiScheduleTranslator_jar.xml b/.idea/artifacts/chengyiScheduleTranslator_jar.xml new file mode 100644 index 0000000..5fc3e9d --- /dev/null +++ b/.idea/artifacts/chengyiScheduleTranslator_jar.xml @@ -0,0 +1,12 @@ + + + $PROJECT_DIR$/out/artifacts/chengyiScheduleTranslator_jar + + + + + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..cf05ea9 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..6560a98 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,36 @@ + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_code_gson_gson_2_8_8.xml b/.idea/libraries/Maven__com_google_code_gson_gson_2_8_8.xml new file mode 100644 index 0000000..1da2fef --- /dev/null +++ b/.idea/libraries/Maven__com_google_code_gson_gson_2_8_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__junit_junit_4_13_2.xml b/.idea/libraries/Maven__junit_junit_4_13_2.xml new file mode 100644 index 0000000..606c352 --- /dev/null +++ b/.idea/libraries/Maven__junit_junit_4_13_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml new file mode 100644 index 0000000..f58bbc1 --- /dev/null +++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..ed0821e --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..e586b4f --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1f0850b --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +### 诚毅课表Json手动生成器 + +--- + +* 项目动机:诚毅学院无法访问获取到课表json数据,无法使用json翻译程序转换成ics文件导入课表 + +#### 运行环境: + +jre1.8 或更新 + +--- + +#### 使用教程: + +安装Java运行环境:可参考 https://jingyan.baidu.com/article/4e5b3e1909043f91911e2464.html + + + diff --git a/chengyiScheduleTranslator.iml b/chengyiScheduleTranslator.iml new file mode 100644 index 0000000..9ea7f41 --- /dev/null +++ b/chengyiScheduleTranslator.iml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..9f891d9 --- /dev/null +++ b/pom.xml @@ -0,0 +1,31 @@ + + + 4.0.0 + + groupId + chengyiScheduleTranslator + 1.0-SNAPSHOT + + + 11 + 11 + + + + + com.google.code.gson + gson + 2.8.8 + + + + + junit + junit + 4.13.2 + test + + + \ No newline at end of file diff --git a/src/main/java/META-INF/MANIFEST.MF b/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 0000000..a02902e --- /dev/null +++ b/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: cn.GnaixEuy.UI.GetPersonalInfo + diff --git a/src/main/java/cn/GnaixEuy/UI/AddClassWindow.form b/src/main/java/cn/GnaixEuy/UI/AddClassWindow.form new file mode 100644 index 0000000..737f546 --- /dev/null +++ b/src/main/java/cn/GnaixEuy/UI/AddClassWindow.form @@ -0,0 +1,211 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/main/java/cn/GnaixEuy/UI/AddClassWindow.java b/src/main/java/cn/GnaixEuy/UI/AddClassWindow.java new file mode 100644 index 0000000..559f0d6 --- /dev/null +++ b/src/main/java/cn/GnaixEuy/UI/AddClassWindow.java @@ -0,0 +1,120 @@ +package cn.GnaixEuy.UI; + +import cn.GnaixEuy.Utils.JsonUtil; +import cn.GnaixEuy.Utils.String2ObjectUtil; +import cn.GnaixEuy.entity.ClassItem; +import cn.GnaixEuy.entity.StudentInfo; + +import javax.swing.*; +import java.awt.event.FocusEvent; +import java.awt.event.FocusListener; +import java.util.Enumeration; + +/** + * + * + * @author GnaixEuy + * @date 2021/9/12 + * @see GnaixEuy的GitHub + */ +public class AddClassWindow extends JDialog { + private JLabel titleLabel; + private JPanel titleJp; + private JPanel mainJp; + private JPanel infoJp; + private JPanel showJp; + private JList addedList; + private JTextArea ClassTextArea; + private JLabel susClassLabel; + private JLabel tipLabel; + private JPanel selectJp; + private JRadioButton RadioButton; + private JRadioButton RadioButton7; + private JRadioButton RadioButton6; + private JRadioButton RadioButton5; + private JRadioButton RadioButton4; + private JRadioButton RadioButton3; + private JRadioButton RadioButton2; + private ButtonGroup selectWeekDayButtonGroup; + private JButton addButton; + private JComboBox coudeTimeComboBox; + private JButton finishbutton; + + private StudentInfo studentInfo; + + public AddClassWindow(StudentInfo studentInfo) { + + //拿到上一个窗口弄来的个人信息 + this.studentInfo = studentInfo; + + //添加按钮组 + this.selectWeekDayButtonGroup = new ButtonGroup(); + selectWeekDayButtonGroup.add(this.RadioButton); + selectWeekDayButtonGroup.add(this.RadioButton2); + selectWeekDayButtonGroup.add(this.RadioButton3); + selectWeekDayButtonGroup.add(this.RadioButton4); + selectWeekDayButtonGroup.add(this.RadioButton5); + selectWeekDayButtonGroup.add(this.RadioButton6); + selectWeekDayButtonGroup.add(this.RadioButton7); + + setContentPane(mainJp); + setModal(true); + setBounds(400, 400, 1600, 1000); + setTitle("诚毅课表Json翻译器 by GnaixEuy"); + + this.addButton.addActionListener(actionEvent -> { + String tempWeekDaySelect = null; //本次添加的星期 + String selectedItem = (String) this.coudeTimeComboBox.getSelectedItem(); + String tmpText = ClassTextArea.getText(); + + + // 已经正确识别到选择的星期了 2021年9月13日12:20 GnaixEuy + Enumeration elements = this.selectWeekDayButtonGroup.getElements(); + while (elements.hasMoreElements()) { + AbstractButton abstractButton = elements.nextElement(); + if (abstractButton.isSelected()) { + tempWeekDaySelect = abstractButton.getText(); + break; + } + } + + ClassItem classItem = new ClassItem(); + boolean b = String2ObjectUtil.dealWithCourseInfo(tmpText, classItem); + if (!b) { + //弹出错误提示 + JOptionPane.showMessageDialog(null, "请输入课程信息", "未监测到课程信息", JOptionPane.ERROR_MESSAGE); + } else { + assert tempWeekDaySelect != null; + assert selectedItem != null; + String2ObjectUtil.stringWeekDay2Number(tempWeekDaySelect, classItem); + String2ObjectUtil.stringCoudeTime2Number(selectedItem, classItem); + this.studentInfo.getCourses().add(classItem); + + //更新列表 + this.addedList.setListData(this.studentInfo.getCourses().toArray()); + } + }); + + //最走产生结果 + this.finishbutton.addActionListener(actionEvent -> { + String s = JsonUtil.Object2Gson(this.studentInfo); + ResultJson resultJson = new ResultJson(s); + resultJson.setVisible(true); + resultJson.pack(); + setVisible(false); + dispose(); + }); + + //点击清空课程信息输入框 + this.ClassTextArea.addFocusListener(new FocusListener() { + @Override + public void focusGained(FocusEvent e) { + ClassTextArea.setText(""); + } + + @Override + public void focusLost(FocusEvent e) { + } + }); + } +} diff --git a/src/main/java/cn/GnaixEuy/UI/GetPersonalInfo.form b/src/main/java/cn/GnaixEuy/UI/GetPersonalInfo.form new file mode 100644 index 0000000..cf93ab4 --- /dev/null +++ b/src/main/java/cn/GnaixEuy/UI/GetPersonalInfo.form @@ -0,0 +1,157 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/main/java/cn/GnaixEuy/UI/GetPersonalInfo.java b/src/main/java/cn/GnaixEuy/UI/GetPersonalInfo.java new file mode 100644 index 0000000..2baec02 --- /dev/null +++ b/src/main/java/cn/GnaixEuy/UI/GetPersonalInfo.java @@ -0,0 +1,99 @@ +package cn.GnaixEuy.UI; + +import cn.GnaixEuy.entity.StudentInfo; + +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; + +/** + * 这是获取个人信息的窗体 + * + * + * @author GnaixEuy + * @date 2021/9/12 + * @see GnaixEuy的GitHub + */ +public class GetPersonalInfo extends JDialog { + private JPanel contentPane; + private JButton buttonOK; + private JButton buttonCancel; + private JPanel mainInputJp; + private JPanel labelJp; + private JTextField nameTextField; + private JTextField workIDTextField; + private JTextField classNameTextField; + + public GetPersonalInfo() { + setContentPane(contentPane); + setModal(true); + getRootPane().setDefaultButton(buttonOK); + + setBounds(400,400,800,800); + setTitle("诚毅课表Json翻译器 by GnaixEuy"); + + buttonOK.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + onOK(); + } + }); + + buttonCancel.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + onCancel(); + } + }); + + // 单击 X 时调用 onCancel() + setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); + addWindowListener(new WindowAdapter() { + @Override + public void windowClosing(WindowEvent e) { + onCancel(); + } + }); + + // 遇到 ESCAPE 时调用 onCancel() + contentPane.registerKeyboardAction(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + onCancel(); + } + }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); + } + + private void onOK() { + // 在此处添加您的代码 + String workId = this.workIDTextField.getText(); + String sName = this.nameTextField.getText(); + String className = this.classNameTextField.getText(); + if("".equals(workId)||"".equals(sName)||"".equals(className)){ + JOptionPane.showMessageDialog(null,"请输入个人信息","未监测到个人信息",JOptionPane.ERROR_MESSAGE); + System.exit(0); + } + StudentInfo studentInfo = new StudentInfo(workId, sName, className); + AddClassWindow addClassWindow = new AddClassWindow(studentInfo); + addClassWindow.pack(); + addClassWindow.setVisible(true); + setVisible(false); +// dispose(); + } + + private void onCancel() { + // 必要时在此处添加您的代码 + dispose(); + } + + public static void main(String[] args) { + GetPersonalInfo dialog = new GetPersonalInfo(); + dialog.pack(); + dialog.setVisible(true); +// System.exit(0); + } + + private void createUIComponents() { + // TODO: place custom component creation code here + } +} diff --git a/src/main/java/cn/GnaixEuy/UI/ResultJson.form b/src/main/java/cn/GnaixEuy/UI/ResultJson.form new file mode 100644 index 0000000..f14b9b1 --- /dev/null +++ b/src/main/java/cn/GnaixEuy/UI/ResultJson.form @@ -0,0 +1,85 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/main/java/cn/GnaixEuy/UI/ResultJson.java b/src/main/java/cn/GnaixEuy/UI/ResultJson.java new file mode 100644 index 0000000..b026bb7 --- /dev/null +++ b/src/main/java/cn/GnaixEuy/UI/ResultJson.java @@ -0,0 +1,45 @@ +package cn.GnaixEuy.UI; + +import javax.swing.*; +import java.awt.event.*; + +public class ResultJson extends JDialog { + private JPanel contentPane; + private JButton buttonOK; + private JTextField textField1; + + public ResultJson(String resultJson) { + setContentPane(contentPane); + setModal(true); + getRootPane().setDefaultButton(buttonOK); + setTitle("诚毅课表Json翻译器 by GnaixEuy"); + setBounds(400,400,800,800); + + this.textField1.setText(resultJson); + + buttonOK.addActionListener(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + onOK(); + } + }); + + // 遇到 ESCAPE 时调用 onCancel() + contentPane.registerKeyboardAction(new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + onCancel(); + } + }, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); + } + + private void onOK() { + // 在此处添加您的代码 + dispose(); + } + + private void onCancel() { + // 必要时在此处添加您的代码 + dispose(); + } +} diff --git a/src/main/java/cn/GnaixEuy/Utils/JsonUtil.java b/src/main/java/cn/GnaixEuy/Utils/JsonUtil.java new file mode 100644 index 0000000..51f80cd --- /dev/null +++ b/src/main/java/cn/GnaixEuy/Utils/JsonUtil.java @@ -0,0 +1,26 @@ +package cn.GnaixEuy.Utils; + +import cn.GnaixEuy.entity.StudentInfo; +import com.google.gson.Gson; + +/** + * + * + * @author GnaixEuy + * @date 2021/9/13 + * @see GnaixEuy的GitHub + */ +public class JsonUtil { + + private static Gson gson; + + static { + JsonUtil.gson = new Gson(); + } + + public static String Object2Gson(StudentInfo studentInfo){ + String s = JsonUtil.gson.toJson(studentInfo, StudentInfo.class); + return s; + } + +} diff --git a/src/main/java/cn/GnaixEuy/Utils/String2ObjectUtil.java b/src/main/java/cn/GnaixEuy/Utils/String2ObjectUtil.java new file mode 100644 index 0000000..b6a713a --- /dev/null +++ b/src/main/java/cn/GnaixEuy/Utils/String2ObjectUtil.java @@ -0,0 +1,117 @@ +package cn.GnaixEuy.Utils; + +import cn.GnaixEuy.entity.ClassItem; + +/** + * + * + * @author GnaixEuy + * @date 2021/9/12 + * @see GnaixEuy的GitHub + */ +public class String2ObjectUtil { + + /** + * 快速测试 + */ + public static void main(String[] args) { + ClassItem classItem = new ClassItem(); + System.out.println("开始"); + dealWithCourseInfo("★非关系型数据库【中软】 诚毅13-205 郑有义 2-13", classItem); + System.out.println(classItem); + } + + public static boolean dealWithCourseInfo(String originalString, ClassItem classItem) { + try { + if ("".equals(originalString)) { + return false; + } + String[] infoString = originalString.split(" "); + classItem.setCouName(infoString[0]); + classItem.setCouRoom(infoString[1]); + classItem.setCouTeaName(infoString[2]); + classItem.setAllWeek(infoString[3]); + } catch (Exception e) { + e.printStackTrace(); + return false; + } + return true; + } + + /** + * 处理上课星期 + * @param weekDay + * @param classItem + * @return + */ + public static boolean stringWeekDay2Number(String weekDay, ClassItem classItem) { + Integer number = null; + switch (weekDay) { + case "星期一": + number = 1; + break; + case "星期二": + number = 2; + break; + case "星期三": + number = 3; + break; + case "星期四": + number = 4; + break; + case "星期五": + number = 5; + break; + case "星期六": + number = 6; + break; + case "星期七": + number = 7; + break; + default: + number = 0; + } + + if (number == 0 || classItem == null) { + return false; + } else { + classItem.setCouDayTime(number); + return true; + } + } + + /** + * 处理上课时间 + * @param coudeTime + * @param classItem + * @return + */ + public static boolean stringCoudeTime2Number(String coudeTime, ClassItem classItem) { + Integer number = null; + switch (coudeTime) { + case "12节": + number = 12; + break; + case "34节": + number = 34; + break; + case "56节": + number = 56; + break; + case "78节": + number = 78; + break; + case "910节": + number = 910; + break; + default: + number = 0; + } + if (number == 0 || classItem == null) { + return false; + } else { + classItem.setCoudeTime(number.toString()); + return true; + } + } +} diff --git a/src/main/java/cn/GnaixEuy/entity/ClassItem.java b/src/main/java/cn/GnaixEuy/entity/ClassItem.java new file mode 100644 index 0000000..80ca3c4 --- /dev/null +++ b/src/main/java/cn/GnaixEuy/entity/ClassItem.java @@ -0,0 +1,90 @@ +package cn.GnaixEuy.entity; + +/** + * 这个是描述json信息的实体类 + * + * + * @author GnaixEuy + * @date 2021/9/12 + * @see GnaixEuy的GitHub + */ +public class ClassItem { + private String couName; + private Integer couDayTime; + private String coudeTime; + private String couRoom; + private String couTeaName; + private String allWeek; + + public ClassItem() { + } + + public ClassItem(String couName, Integer couDayTime, String coudeTime, String couRoom, String couTeaName, String allWeek) { + this.couName = couName; + this.couDayTime = couDayTime; + this.coudeTime = coudeTime; + this.couRoom = couRoom; + this.couTeaName = couTeaName; + this.allWeek = allWeek; + } + + @Override + public String toString() { + return "ClassItem{" + + "couName='" + couName + '\'' + + ", couDayTime=" + couDayTime + + ", coudeTime='" + coudeTime + '\'' + + ", couRoom='" + couRoom + '\'' + + ", couTeaName='" + couTeaName + '\'' + + ", allWeek='" + allWeek + '\'' + + '}'; + } + + public String getCouName() { + return couName; + } + + public void setCouName(String couName) { + this.couName = couName; + } + + public Integer getCouDayTime() { + return couDayTime; + } + + public void setCouDayTime(Integer couDayTime) { + this.couDayTime = couDayTime; + } + + public String getCoudeTime() { + return coudeTime; + } + + public void setCoudeTime(String coudeTime) { + this.coudeTime = coudeTime; + } + + public String getCouRoom() { + return couRoom; + } + + public void setCouRoom(String couRoom) { + this.couRoom = couRoom; + } + + public String getCouTeaName() { + return couTeaName; + } + + public void setCouTeaName(String couTeaName) { + this.couTeaName = couTeaName; + } + + public String getAllWeek() { + return allWeek; + } + + public void setAllWeek(String allWeek) { + this.allWeek = allWeek; + } +} diff --git a/src/main/java/cn/GnaixEuy/entity/StudentInfo.java b/src/main/java/cn/GnaixEuy/entity/StudentInfo.java new file mode 100644 index 0000000..c3762a6 --- /dev/null +++ b/src/main/java/cn/GnaixEuy/entity/StudentInfo.java @@ -0,0 +1,78 @@ +package cn.GnaixEuy.entity; + +import java.util.ArrayList; +import java.util.List; + +/** + * + * + * @author GnaixEuy + * @date 2021/9/12 + * @see GnaixEuy的GitHub + */ +public class StudentInfo { + private String sid; + private String Name; + private String className; + private List courses; + + public StudentInfo() { + this.courses = new ArrayList(); + } + + public StudentInfo(String sid, String name, String className) { + this.sid = sid; + this.Name = name; + this.className = className; + this.courses = new ArrayList(); + } + + public StudentInfo(String sid, String name, String className, List courses) { + this.sid = sid; + this.Name = name; + this.className = className; + this.courses = courses; + } + + @Override + public String toString() { + return "StudentInfo{" + + "sid='" + sid + '\'' + + ", name='" + Name + '\'' + + ", className='" + className + '\'' + + ", courses=" + courses + + '}'; + } + + public String getSid() { + return sid; + } + + public void setSid(String sid) { + this.sid = sid; + } + + public String getName() { + return Name; + } + + public void setName(String name) { + this.Name = name; + } + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public List getCourses() { + return courses; + } + + public void setCourses(List courses) { + this.courses = courses; + } +} diff --git a/src/main/resources/chengyi.jpeg b/src/main/resources/chengyi.jpeg new file mode 100644 index 0000000..09f6706 Binary files /dev/null and b/src/main/resources/chengyi.jpeg differ diff --git a/src/test/java/Utils/test.java b/src/test/java/Utils/test.java new file mode 100644 index 0000000..1d60ec8 --- /dev/null +++ b/src/test/java/Utils/test.java @@ -0,0 +1,23 @@ +package Utils; + +import cn.GnaixEuy.Utils.String2ObjectUtil; +import cn.GnaixEuy.entity.ClassItem; +import org.junit.Test; + +/** + * + * + * @author GnaixEuy + * @date 2021/9/12 + * @see GnaixEuy的GitHub + */ +public class test { + + @Test + public void testString2ObjectUtil(){ + ClassItem classItem = new ClassItem(); + System.out.println("开始"); + String2ObjectUtil.dealWithCourseInfo("★非关系型数据库【中软】 诚毅13-205 郑有义 2-13",classItem); + System.out.println(classItem); + } +} diff --git a/src/test/java/entity/TestStudentInfo.java b/src/test/java/entity/TestStudentInfo.java new file mode 100644 index 0000000..b8e37d8 --- /dev/null +++ b/src/test/java/entity/TestStudentInfo.java @@ -0,0 +1,21 @@ +package entity; + +import cn.GnaixEuy.entity.StudentInfo; +import org.junit.Test; + +/** + * + * + * @author GnaixEuy + * @date 2021/9/12 + * @see GnaixEuy的GitHub + */ +public class TestStudentInfo { + + @Test + public void testStudentInfoInit(){ + StudentInfo studentInfo = new StudentInfo(); + System.out.println(studentInfo); + + } +} diff --git a/src/test/java/testAdd.java b/src/test/java/testAdd.java new file mode 100644 index 0000000..78f7378 --- /dev/null +++ b/src/test/java/testAdd.java @@ -0,0 +1,18 @@ +import cn.GnaixEuy.entity.StudentInfo; +import org.junit.Test; + +/** + * + * + * @author GnaixEuy + * @date 2021/9/12 + * @see GnaixEuy的GitHub + */ +public class testAdd { + + @Test + public void test(){ + StudentInfo studentInfo = new StudentInfo(); + + } +}