-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit of Event handling for Institute Events * Replace logger with slf4j * Added model and services for contact updates * Added handler services for institute contact events * Updating events * Minor change * Flyway to expand update and create user in replication table to be in line with edx, institute. * Flyway to expand update and create user in replication table to be in line with edx, institute. * Added unit testing. * Removed TODOs * Added another test. * Bumping test coverage again. * Addressing maintainability issues. * Patch for adding default no args constructors to model. * Code cleanup --------- Co-authored-by: chris.ditcher <[email protected]>
- Loading branch information
Showing
4 changed files
with
69 additions
and
50 deletions.
There are no files selected for viewing
13 changes: 10 additions & 3 deletions
13
api/src/main/java/ca/bc/gov/educ/api/trax/model/dto/AuthorityContact.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 10 additions & 3 deletions
13
api/src/main/java/ca/bc/gov/educ/api/trax/model/dto/DistrictContact.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,19 +53,18 @@ public static Event createEvent(String eventType, Object payload, EventRepositor | |
} | ||
|
||
public static AuthorityContact createAuthorityContact() { | ||
var auth = AuthorityContact.builder() | ||
.independentAuthorityId(UUID.randomUUID().toString()) | ||
.firstName("Bud") | ||
.lastName("Weiser") | ||
.phoneNumber("3216549874") | ||
.phoneExtension("321") | ||
.alternatePhoneNumber("3216547894") | ||
.alternatePhoneExtension("555") | ||
.email("[email protected]") | ||
.authorityContactTypeCode("DIRECTOR") | ||
.effectiveDate(LocalDateTime.now().toString()) | ||
.expiryDate(LocalDateTime.now().plus(1, ChronoUnit.DAYS).toString()) | ||
.build(); | ||
var auth = new AuthorityContact(); | ||
auth.setIndependentAuthorityId(UUID.randomUUID().toString()); | ||
auth.setFirstName("Bud"); | ||
auth.setLastName("Weiser"); | ||
auth.setPhoneNumber("3216549874"); | ||
auth.setPhoneExtension("321"); | ||
auth.setAlternatePhoneNumber("3216547894"); | ||
auth.setAlternatePhoneExtension("555"); | ||
auth.setEmail("[email protected]"); | ||
auth.setAuthorityContactTypeCode("DIRECTOR"); | ||
auth.setEffectiveDate(LocalDateTime.now().toString()); | ||
auth.setExpiryDate(LocalDateTime.now().plus(1, ChronoUnit.DAYS).toString()); | ||
auth.setCreateDate(LocalDateTime.now().toString()); | ||
auth.setCreateUser("TEST"); | ||
auth.setUpdateDate(LocalDateTime.now().toString()); | ||
|
@@ -74,20 +73,19 @@ public static AuthorityContact createAuthorityContact() { | |
} | ||
|
||
public static SchoolContact createSchoolContact() { | ||
var contact = SchoolContact.builder() | ||
.schoolId(UUID.randomUUID().toString()) | ||
.firstName("Testy") | ||
.lastName("MacTesterton") | ||
.phoneNumber("3216549874") | ||
.phoneExtension("123") | ||
.alternatePhoneNumber("3216549874") | ||
.alternatePhoneExtension("321") | ||
.email("[email protected]") | ||
.jobTitle("The Tester") | ||
.schoolContactTypeCode("PRINCIPAL") | ||
.effectiveDate(LocalDate.now().toString()) | ||
.expiryDate(LocalDateTime.now().plus(1, ChronoUnit.DAYS).toString()) | ||
.build(); | ||
var contact = new SchoolContact(); | ||
contact.setSchoolId(UUID.randomUUID().toString()); | ||
contact.setFirstName("Testy"); | ||
contact.setLastName("MacTesterton"); | ||
contact.setPhoneNumber("3216549874"); | ||
contact.setPhoneExtension("123"); | ||
contact.setAlternatePhoneNumber("3216549874"); | ||
contact.setAlternatePhoneExtension("321"); | ||
contact.setEmail("[email protected]"); | ||
contact.setJobTitle("The Tester"); | ||
contact.setSchoolContactTypeCode("PRINCIPAL"); | ||
contact.setEffectiveDate(LocalDate.now().toString()); | ||
contact.setExpiryDate(LocalDateTime.now().plus(1, ChronoUnit.DAYS).toString()); | ||
contact.setCreateDate(LocalDateTime.now().toString()); | ||
contact.setCreateUser("TEST"); | ||
contact.setUpdateDate(LocalDateTime.now().toString()); | ||
|
@@ -96,20 +94,19 @@ public static SchoolContact createSchoolContact() { | |
} | ||
|
||
public static DistrictContact createDistrictContact() { | ||
var contact = DistrictContact.builder() | ||
.districtId(UUID.randomUUID().toString()) | ||
.firstName("Testy") | ||
.lastName("MacTesterton") | ||
.phoneNumber("3216549874") | ||
.phoneExtension("123") | ||
.alternatePhoneNumber("3216549874") | ||
.alternatePhoneExtension("321") | ||
.email("[email protected]") | ||
.jobTitle("The Tester") | ||
.districtContactTypeCode("PRINCIPAL") | ||
.effectiveDate(LocalDate.now().toString()) | ||
.expiryDate(LocalDateTime.now().plus(1, ChronoUnit.DAYS).toString()) | ||
.build(); | ||
var contact = new DistrictContact(); | ||
contact.setDistrictId(UUID.randomUUID().toString()); | ||
contact.setFirstName("Testy"); | ||
contact.setLastName("MacTesterton"); | ||
contact.setPhoneNumber("3216549874"); | ||
contact.setPhoneExtension("123"); | ||
contact.setAlternatePhoneNumber("3216549874"); | ||
contact.setAlternatePhoneExtension("321"); | ||
contact.setEmail("[email protected]"); | ||
contact.setJobTitle("The Tester"); | ||
contact.setDistrictContactTypeCode("PRINCIPAL"); | ||
contact.setEffectiveDate(LocalDate.now().toString()); | ||
contact.setExpiryDate(LocalDateTime.now().plus(1, ChronoUnit.DAYS).toString()); | ||
contact.setCreateDate(LocalDateTime.now().toString()); | ||
contact.setCreateUser("TEST"); | ||
contact.setUpdateDate(LocalDateTime.now().toString()); | ||
|