Browse Source

refactoring: adjusting Test functions to the naming convention agreed on

remotes/origin/fdai7780
fdai7921 11 months ago
parent
commit
910461e1ad
  1. 8
      src/test/java/org/example/CourseTest.java

8
src/test/java/org/example/CourseTest.java

@ -24,7 +24,7 @@ class CourseTest {
* Verifies that the method correctly prints course information to the console.
*/
@Test
void printCourseInfo() {
void testPrintCourseInfo() {
// Set up the expected output
String expectedCourseName = "Course Name: Math";
String expectedCourseCode = "Course Code: M101";
@ -58,7 +58,7 @@ class CourseTest {
* Verifies that course data is correctly written to a file and can be read back.
*/
@Test
void writeToFile() {
void testWriteToFile() {
// Create a new course
Course course = sampleCourse;
@ -84,7 +84,7 @@ class CourseTest {
* Verifies that course data can be correctly read from a file.
*/
@Test
void readFromFile() {
void testReadFromFile() {
// Create a temporary file with sample course data
createTempFile("Math", "C101", "3", "Science", "C201", "4");
@ -109,7 +109,7 @@ class CourseTest {
}
@Test
void addCourse() {
void testAddCourse() {
// Create a new course
String courseName = sampleCourse.getCourseName();
String courseCode = sampleCourse.getCourseID();

Loading…
Cancel
Save