fdai7887 11 months ago
parent
commit
8268c49752
  1. 3
      src/test/java/org/example/StudentTest.java

3
src/test/java/org/example/StudentTest.java

@ -72,12 +72,11 @@ class StudentTest {
@Test @Test
void testPrintStudentInfo() { void testPrintStudentInfo() {
Student student = sampleStudent;
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
System.setOut(new PrintStream(outputStream)); System.setOut(new PrintStream(outputStream));
student.printStudentInfo();
sampleStudent.printStudentInfo();
String printedOutput = outputStream.toString().trim(); String printedOutput = outputStream.toString().trim();

Loading…
Cancel
Save