forked from wujun728/jun_java_plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest1.java
More file actions
40 lines (31 loc) · 758 Bytes
/
Test1.java
File metadata and controls
40 lines (31 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.itheima.test;
import junit.framework.Assert;
import org.junit.Test;
import com.itheima.dao.StudentDao;
import com.itheima.domain.Student;
public class Test1 {
StudentDao dao = new StudentDao();
// @Test
public void add(){
Student stu = new Student("100","1200","ÕżҸÛ","Õżҽç1",100);
boolean flag = dao.addStudent(stu);
Assert.assertEquals(true, flag);
}
@Test
public void findStudent(){
String str="1200";
Student stu = dao.findStudentByExamid(str);
System.out.println(stu);
}
@Test
public void updateStudent(){
String str="1200";
Student stu = dao.findStudentByExamid(str);
System.out.println(stu);
}
// @Test
public void deleteStudent(){
String name ="ÕżҸÛ";
dao.deleteStudentByName(name);
}
}