Commit 567136cb authored by 9731077's avatar 9731077

test1

parents
Pipeline #462 failed with stages
package test;
import com.university.Department;
import com.university.Student;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
public class StudnetTest {
static Student student;
static Department department;
@BeforeAll
public static void createStudent(){
department = new Department("Computer and IT Eng");
student = new Student("Alireza", "1234", "Software Eng", department);
}
@Test
public void testStudentGetName(){
assertEquals("Alireza", student.getName());
}
@Test
public void testStudenGetCourses(){
assertNotNull(student.getCourses());
assertEquals(0, student.getCourses().size());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment