Skip to content

Commit 07ada74

Browse files
author
AmiyahJo
committed
feat: adds testGetName()
1 parent e35a659 commit 07ada74

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,19 @@ void testGetId() {
4545
@Test
4646
void testGetName() {
4747
//Arrange
48+
Employee employee = new Employee(12345, "John Doe", "Engineering", 75000);
49+
4850
//Act
51+
employee.getName();
52+
53+
//Assert
54+
assertEquals("John Doe", employee.getName());
4955
}
5056

5157
@Test
5258
void testGetSalary() {
5359
//Arrange
60+
Employee employee = new Employee(12345, "John Doe", "Engineering", 75000);
5461
//Act
5562
}
5663

0 commit comments

Comments
 (0)