Skip to content

Commit e35d35e

Browse files
fix: commented out code
1 parent e66c057 commit e35d35e

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

lesson_15/tdd/tdd_app/src/main/java/com/codedifferently/lesson15/Employee.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public void setDetails(int id, String name, String department, double salary) {
3131
this.salary = salary;
3232
}
3333

34-
// Getters and setters
3534
public int getId() {
3635
return id;
3736
}

lesson_15/tdd/tdd_app/src/main/java/com/codedifferently/lesson15/Lesson15.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
public class Lesson15 {
44

55
public static void main(String[] args) {
6-
System.out.println(getGreeting()); // This line is needed!
6+
System.out.println(getGreeting());
77

88
Employee emp = new Employee(1, "Rasheed Miller", "IT", 50000.0);
99
System.out.println(emp.getDetails());

lesson_15/tdd/tdd_app/src/test/java/com/codedifferently/lesson15/Lesson15Test.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,15 @@ public class Lesson15Test {
1010

1111
@Test
1212
public void testMainPrintsGreetingAndEmployeeDetails() {
13-
// Capture console output
13+
1414
PrintStream originalOut = System.out;
1515
ByteArrayOutputStream outContent = new ByteArrayOutputStream();
1616
System.setOut(new PrintStream(outContent));
1717

18-
// Execute main
1918
Lesson15.main(new String[] {});
2019

21-
// Restore System.out
2220
System.setOut(originalOut);
2321

24-
// Get output and verify
2522
String output = outContent.toString().trim();
2623
assertThat(output).contains("Hello, World!");
2724
assertThat(output)

0 commit comments

Comments
 (0)