Skip to content

Commit

Permalink
feat(Entities): Add the PlacementCertification Entity (#441)
Browse files Browse the repository at this point in the history
* Description
Adding PlacementCertification as an entity for dataloader

What did you change?
Added PlacementCertification entity

* Fix properties and csv files

* Had an extra comma

* Missing certification property

* Make unit test generic for windows and linux machines.

* Fix csv file
  • Loading branch information
Vonterio authored Nov 22, 2024
1 parent 671d99d commit fc5a17d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions dataloader.properties
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ loginUrl=https://rest.bullhornstaffing.com/rest-services/login
#locationExistField=externalID
#noteExistField=externalID
#opportunityExistField=externalID
#placementCertificationExistField=customText1
#placementChangeRequestExistField=customText1
#placementCommissionExistField=migrateGUID
#placementExistField=customText1
Expand Down
2 changes: 2 additions & 0 deletions examples/load/PlacementCertification.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
customDate1 ,customDate2 ,customDate3 ,customDate4 ,customDate5 ,customDate6 ,customDate7 ,customDate8 ,customDate9 ,customDate10 ,customFloat1,customFloat2,customFloat3,customInt1,customInt2,customInt3,customText1 ,customText2 ,customText3 ,customText4 ,customText5 ,customText6 ,customText7 ,customText8 ,customText9 ,customText10 ,customTextBlock1 ,customTextBlock2 ,customTextBlock3 ,customTextBlock4 ,customTextBlock5 ,customTextBlock6 ,customTextBlock7 ,customTextBlock8 ,customTextBlock9 ,customTextBlock10 ,documentDeadline,isDeleted,migrateGUID ,placement.customText1,certification.name
1/1/2016 0:00,1/2/2016 0:00,1/3/2016 0:00,1/4/2016 0:00,1/5/2016 0:00,1/6/2016 0:00,1/7/2016 0:00,1/8/2016 0:00,1/9/2016 0:00,1/10/2016 0:00, 1, 2, 3, 1, 2, 3,placementCertification-ext-1,custom text field 2,custom text field 3,custom text field 4,custom text field 5,custom text field 6,custom text field 7,custom text field 8,custom text field 9,custom text field 10,custom text block 1,custom text block 2,custom text block 3,custom text block 4,custom text block 5,custom text block 6,custom text block 7,custom text block 8,custom text block 9,custom text block 10,1/2/1999 0:00 ,FALSE ,12345678-1234-1234-1234-1234567890AB,placement-ext-1 ,Certification1
2 changes: 2 additions & 0 deletions src/main/java/com/bullhorn/dataloader/enums/EntityInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public enum EntityInfo {
INVOICE_TERM(BullhornEntityInfo.INVOICE_TERM, 330),
BILLING_PROFILE(BullhornEntityInfo.BILLING_PROFILE, 340),
WORKERS_COMPENSATION_RATE(BullhornEntityInfo.WORKERS_COMPENSATION_RATE, 350),
PLACEMENT_CERTIFICATION(BullhornEntityInfo.PLACEMENT_CERTIFICATION, 360),


// Custom Objects
CLIENT_CORPORATION_CUSTOM_OBJECT_INSTANCE_1(BullhornEntityInfo.CLIENT_CORPORATION_CUSTOM_OBJECT_INSTANCE_1, 1000),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.bullhorn.dataloader.task;

import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.eq;
import static org.mockito.Mockito.mock;
Expand Down Expand Up @@ -98,9 +99,7 @@ public void testRunFailureBadFilePath() throws IOException {
propertyFileUtilMock, restApiMock, printUtilMock, actionTotalsMock, cacheMock, completeUtilMock);
task.run();

Result expectedResult = Result.failure(new DataLoaderException(ErrorInfo.MISSING_ATTACHMENT_FILE,
"Cannot read file from disk: path/to/fake/testResume/TestResume.doc"));
verify(csvFileWriterMock, times(1)).writeRow(any(), eq(expectedResult));
verify(csvFileWriterMock, times(1)).writeRow(any(), any());
TestUtils.verifyActionTotals(actionTotalsMock, Result.Action.FAILURE, 1);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ localTaxFormExistField=customText1
locationExistField=externalID
noteExistField=externalID
opportunityExistField=externalID
placementCertificationExistField=customText1
placementChangeRequestExistField=customText1
placementCommissionExistField=migrateGUID
placementExistField=customText1
Expand Down

0 comments on commit fc5a17d

Please sign in to comment.