master
bseayin 2019-08-17 20:45:45 +08:00
parent 26ec8d8c4b
commit 72d9d0afc7
1 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,54 @@
package com.zz;
import java.util.List;
import javax.annotation.Resource;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import com.zz.entity.Student;
import com.zz.repository.StudentRepository;
@RunWith(SpringRunner.class)
@SpringBootTest
public class StudentTest {
@Resource
StudentRepository studentRepository;
@Test
public void t1(){
Student s=studentRepository.getStudentsdfsdfnative(1, "JDBC");
System.out.println(s.getScore());
}
@Test
public void t2(){
List<Object[]> s=studentRepository.getSubGroup();
System.out.println(s.get(0)[0]);
System.out.println(s.get(0)[1]);
System.out.println(s.get(1)[0]);
System.out.println(s.get(1)[1]);
}
@Test
public void t3(){
List<Object[]> s=studentRepository.selectHomeWork("1");
System.out.println(s.get(0)[0]);
System.out.println(s.get(0)[1]);
// System.out.println(s.get(1)[0]);
// System.out.println(s.get(1)[1]);
}
@Test
public void t4(){
int i=studentRepository.updateStu(6);
}
}