lundi 1 juillet 2019

I am trying to writing JUnit test case for a method to insert timesheet which takes the parameter as employee Id. How should I try?

I tried to create a new object for timesheet and assign values but I have to method insertTimesheet takes employeeId. As theres no value for employeeId in timesheet the test gets failed.

''' @Test public void testInsertTimesheet() { Timesheet expectedToSave = new Timesheet( 1001 ,"2019-01-10", "2019-01-05", "comment section is this ", "saved", null, null);

int actualInsertData = timesheetRepository.insertTimesheet(expectedToSave, 100789); Assertions.assertEquals(expectedToSave, actualInsertData); } '''

Aucun commentaire:

Enregistrer un commentaire