Skip to content

Commit 1784a2b

Browse files
committed
refactor: remove commented code in test file
Signed-off-by: gouravkrosx <[email protected]>
1 parent a4fd12c commit 1784a2b

File tree

1 file changed

+1
-35
lines changed

1 file changed

+1
-35
lines changed

src/test/java/SamplesJavaApplication_Test.java

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
import org.mockito.InjectMocks;
99
import org.mockito.Mock;
1010

11-
import java.time.Instant;
1211
import java.util.concurrent.CountDownLatch;
1312

1413
import static org.junit.jupiter.api.Assertions.*;
15-
import static org.mockito.Mockito.verify;
16-
import static org.mockito.Mockito.when;
14+
1715

1816
public class SamplesJavaApplication_Test {
1917

@@ -37,36 +35,4 @@ public void TestKeploy() throws InterruptedException {
3735
countDownLatch.await();
3836
assertTrue(AssertKTests.result());
3937
}
40-
41-
// @Test
42-
// public void testCreateEmployee() {
43-
// System.out.println("testing createEmployee controller");
44-
// // Create a new Employee object for the request body
45-
//// Employee requestEmployee = new Employee();
46-
//// requestEmployee.setFirstName("John");
47-
//// requestEmployee.setLastName("Doe");
48-
//// requestEmployee.setEmail("[email protected]");
49-
////
50-
//// // Create a mock Employee object to return from the repository
51-
//// Employee savedEmployee = new Employee();
52-
//// savedEmployee.setId(1L);
53-
//// savedEmployee.setFirstName("John");
54-
//// savedEmployee.setLastName("Doe");
55-
//// savedEmployee.setEmail("[email protected]");
56-
//// savedEmployee.setTimestamp(Instant.now().getEpochSecond());
57-
//// when(employeeRepository.save(requestEmployee)).thenReturn(savedEmployee);
58-
////
59-
//// // Call the createEmployee method with the request Employee object
60-
//// Employee resultEmployee = employeeController.createEmployee(requestEmployee);
61-
////
62-
//// // Verify that the repository save method was called with the request Employee object
63-
//// ArgumentCaptor<Employee> captor = ArgumentCaptor.forClass(Employee.class);
64-
//// verify(employeeRepository).save(captor.capture());
65-
//// assertEquals(requestEmployee, captor.getValue());
66-
//
67-
// // Verify that the returned Employee object matches the mock object returned from the repository
68-
// assertTrue(true);
69-
// System.out.println("Done executing this unit test case (createEmployee)");
70-
// }
71-
7238
}

0 commit comments

Comments
 (0)