Skip to content

Commit

Permalink
Added new partnering and volunteer families, so it won't affect exist…
Browse files Browse the repository at this point in the history
…ing tests
  • Loading branch information
PabloDinella committed Sep 12, 2024
1 parent 92a8cd7 commit 7bb531b
Showing 1 changed file with 108 additions and 10 deletions.
118 changes: 108 additions & 10 deletions test/CareTogether.TestData/TestDataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ public static class TestDataProvider
static readonly Guid volunteerId = Guid.Parse("e3aaef77-0e97-47a6-b788-a67c237c781e");


// Fisher family
static readonly Guid michaelFisherGuid = Guid.Parse("f6020665-6f2e-4c93-8673-8770f35f1609");

static readonly Guid sarahFisherGuid = Guid.Parse("7dc7e4f8-99cc-4076-9c3c-8229768f8b66");
static readonly Guid nemoFisherGuid = Guid.Parse("4a43d33e-e9a6-4045-b374-17ebc223daa7");
static readonly Guid fisherFamilyGuid = guid6;
static readonly Guid fisherFamilyReferral1Guid = guid1;
static readonly Guid fisherFamilyArrangement1Guid = guid1;

// Brambleswift family
static readonly Guid berrinBrambleswiftGuid = Guid.Parse("11768904-7738-430a-81b8-fbd7b4168f11");
static readonly Guid eldaBrambleswiftVolunteerGuid = Guid.Parse("3d49cfb8-af1e-429b-82dc-484559782118");
static readonly Guid brambleswiftFamilyGuid = guid7;



public static async Task PopulateTestDataAsync(
IEventLog<AccountEvent> accountsEventLog,
IEventLog<PersonAccessEvent> personAccessEventLog,
Expand Down Expand Up @@ -276,7 +292,56 @@ await directoryEventLog.AppendEventsAsync(guid1, guid2,
[], null, [], null, [], null, null, null)),
new FamilyCommandExecuted(adminId, ReferralsMonth(21), new CreateFamily(guid5, guidB,
[(guidB, new FamilyAdultRelationshipInfo("Single", true))],
[guidC], [new CustodialRelationship(guidC, guidB, CustodialRelationshipType.LegalGuardian)]))
[guidC], [new CustodialRelationship(guidC, guidB, CustodialRelationshipType.LegalGuardian)])),


// Add Fisher family
new PersonCommandExecuted(adminId, ApprovalsMonth(1), new CreatePerson(michaelFisherGuid, "Michael", "Fisher", Gender.Male, YearsOld(35), "Caucasian",
[], null, [], null, [], null, "Fisherman", null)),
new PersonCommandExecuted(adminId, ApprovalsMonth(1), new CreatePerson(sarahFisherGuid, "Sarah", "Fisher", Gender.Female, YearsOld(33), "Caucasian",
[], null, [], null, [], null, "Marine Biologist", null)),
new PersonCommandExecuted(adminId, ApprovalsMonth(1), new CreatePerson(nemoFisherGuid, "Nemo", "Fisher", Gender.Male, YearsOld(7), "Caucasian",
[], null, [], null, [], null, null, null)),
new FamilyCommandExecuted(adminId, ApprovalsMonth(1), new CreateFamily(fisherFamilyGuid, michaelFisherGuid,
[
(michaelFisherGuid, new FamilyAdultRelationshipInfo("Dad", true)),
(sarahFisherGuid, new FamilyAdultRelationshipInfo("Mom", true)),
],
[nemoFisherGuid],
[
new CustodialRelationship(nemoFisherGuid, michaelFisherGuid, CustodialRelationshipType.ParentWithCustody),
new CustodialRelationship(nemoFisherGuid, sarahFisherGuid, CustodialRelationshipType.ParentWithCustody),
])),
new PersonCommandExecuted(adminId, ApprovalsMonth(1), new AddPersonAddress(michaelFisherGuid,
new Address(guid4, "42 Coral Reef Lane", null, "Atlantis", null, "OC", "12345"),
true)),
new PersonCommandExecuted(adminId, ApprovalsMonth(1), new AddPersonPhoneNumber(michaelFisherGuid,
new PhoneNumber(guid4, "5551234567", PhoneNumberType.Mobile),
true)),
new PersonCommandExecuted(adminId, ApprovalsMonth(1), new AddPersonEmailAddress(michaelFisherGuid,
new EmailAddress(guid4, "[email protected]", EmailAddressType.Personal),
true)),

// Add new volunteer family
new PersonCommandExecuted(adminId, ApprovalsMonth(1), new CreatePerson(berrinBrambleswiftGuid, "Berrin", "Brambleswift", Gender.Male, YearsOld(40), "Caucasian",
[], null, [], null, [], null, null, null)),
new PersonCommandExecuted(adminId, ApprovalsMonth(1), new CreatePerson(eldaBrambleswiftVolunteerGuid, "Elda", "Brambleswift", Gender.Female, YearsOld(38), "Caucasian",
[], null, [], null, [], null, null, null)),
new FamilyCommandExecuted(adminId, ApprovalsMonth(1), new CreateFamily(brambleswiftFamilyGuid, berrinBrambleswiftGuid,
[
(berrinBrambleswiftGuid, new FamilyAdultRelationshipInfo("Dad", true)),
(eldaBrambleswiftVolunteerGuid, new FamilyAdultRelationshipInfo("Mom", true)),
],
[], [])),
new PersonCommandExecuted(adminId, ApprovalsMonth(1), new AddPersonAddress(berrinBrambleswiftGuid,
new Address(guid5, "789 Helper St", null, "Voluntown", null, "VS", "54321"),
true)),
new PersonCommandExecuted(adminId, ApprovalsMonth(1), new AddPersonPhoneNumber(berrinBrambleswiftGuid,
new PhoneNumber(guid5, "5559876543", PhoneNumberType.Mobile),
true)),
new PersonCommandExecuted(adminId, ApprovalsMonth(1), new AddPersonEmailAddress(berrinBrambleswiftGuid,
new EmailAddress(guid5, "[email protected]", EmailAddressType.Personal),
true))
);
}

Expand Down Expand Up @@ -318,19 +383,33 @@ await referralsEventLog.AppendEventsAsync(guid1, guid2,
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 10, 0, 0), new CreateArrangement(guid1, guid2, [guid3], "Friending", ReferralsMonth(3), guid1, "Respite")),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 10, 0, 0), new CreateArrangement(guid1, guid2, [guid4], "Friending", ReferralsMonth(4), guid2, "Respite")),

new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0), new AssignIndividualVolunteer(guid1, guid2, [guid4], guid4, guid4, "Family Coach", null)),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0), new AssignIndividualVolunteer(guid1, guid2, [guid4], guid4, guid4, "Family Friend", null)),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0), new AssignIndividualVolunteer(guid1, guid2, [guid4], guid0, guid0, "Staff Supervision", null)),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0), new ExemptArrangementRequirement(guid1, guid2, [guid4], "Advocacy Agreement", null, "Not needed", null)),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0), new StartArrangements(guid1, guid2, [guid4], ReferralsMonth(1, 15, 0, 0))),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0), new CompleteArrangementRequirement(guid1, guid2, [guid4], guid3, "Family Coach Checkin", ReferralsMonth(4, 2, 59, 0), null, null)),

new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 10, 0, 0), new CreateArrangement(guid1, guid2, [guid5], "Hosting", ReferralsMonth(5), guid3, null)),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 10, 0, 0), new UpdateArrangementComments(guid1, guid2, [guid2], "Start on Friday the 11th")),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 10, 0, 0), new UpdateArrangementComments(guid1, guid2, [guid3, guid4], "Start on Saturday the 12th")),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0), new AssignIndividualVolunteer(guid1, guid2, [guid5], guid4, guid4, "Family Coach", null)),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0), new AssignVolunteerFamily(guid1, guid2, [guid5], guid2, "Host Family", null)), // Demonstrates invalid data (variant required by newer policy)
new ReferralCommandExecuted(adminId, ReferralsMonth(21, 20, 38, 0), new CreateReferral(guid5, guid3, ReferralsMonth(21, 20, 38, 0)))

new ReferralCommandExecuted(adminId, ReferralsMonth(21, 20, 38, 0), new CreateReferral(guid5, guid3, ReferralsMonth(21, 20, 38, 0))),

// Fisher family
new ReferralCommandExecuted(adminId, ReferralsMonth(1, 12, 0, 0), new CreateReferral(fisherFamilyGuid, fisherFamilyReferral1Guid, ReferralsMonth(1, 12, 0, 0))),

new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 10, 0, 0),
new CreateArrangement(fisherFamilyGuid, fisherFamilyReferral1Guid, [fisherFamilyArrangement1Guid], "Friending", ReferralsMonth(4), michaelFisherGuid, "Respite")),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0),
new AssignIndividualVolunteer(fisherFamilyGuid, fisherFamilyReferral1Guid, [fisherFamilyArrangement1Guid], brambleswiftFamilyGuid, berrinBrambleswiftGuid, "Family Coach", null)),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0),
new AssignIndividualVolunteer(fisherFamilyGuid, fisherFamilyReferral1Guid, [fisherFamilyArrangement1Guid], brambleswiftFamilyGuid, berrinBrambleswiftGuid, "Family Friend", null)),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0),
new AssignIndividualVolunteer(fisherFamilyGuid, fisherFamilyReferral1Guid, [fisherFamilyArrangement1Guid], guid0, guid0, "Staff Supervision", null)),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0),
new ExemptArrangementRequirement(fisherFamilyGuid, fisherFamilyReferral1Guid, [fisherFamilyArrangement1Guid], "Advocacy Agreement", null, "Not needed", null)),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0),
new StartArrangements(fisherFamilyGuid, fisherFamilyReferral1Guid, [fisherFamilyArrangement1Guid], ReferralsMonth(1, 15, 0, 0))),
new ArrangementsCommandExecuted(adminId, ReferralsMonth(3, 11, 0, 0),
new CompleteArrangementRequirement(fisherFamilyGuid, fisherFamilyReferral1Guid, [fisherFamilyArrangement1Guid], guid3, "Family Coach Checkin", ReferralsMonth(4, 2, 59, 0), null, null))


);
}

Expand Down Expand Up @@ -389,7 +468,26 @@ await approvalsEventLog.AppendEventsAsync(guid1, guid2,
new VolunteerCommandExecuted(adminId, ApprovalsMonth(21),
new ExemptVolunteerRequirement(guid3, guid9, "Host Family Training", "She's a Betazoid. Empaths don't need training.", null)),
new VolunteerCommandExecuted(adminId, ApprovalsMonth(25),
new CompleteVolunteerRequirement(guid3, guid9, new Guid(), "Comprehensive Background Check", ApprovalsMonth(25), null, null))
new CompleteVolunteerRequirement(guid3, guid9, new Guid(), "Comprehensive Background Check", ApprovalsMonth(25), null, null)),

// Add approval events for new volunteer family
new VolunteerFamilyCommandExecuted(adminId, ApprovalsMonth(5),
new UploadVolunteerFamilyDocument(guid7, guid6, "volunteer_family_application.pdf")),
new VolunteerFamilyCommandExecuted(adminId, ApprovalsMonth(5),
new CompleteVolunteerFamilyRequirement(guid7, guid1, "Host Family Application", ApprovalsMonth(5), guid6, null)),
new VolunteerCommandExecuted(adminId, ApprovalsMonth(6),
new CompleteVolunteerRequirement(guid7, berrinBrambleswiftGuid, guid7, "Background Check", ApprovalsMonth(6), guid7, null)),
new VolunteerCommandExecuted(adminId, ApprovalsMonth(6),
new CompleteVolunteerRequirement(guid7, eldaBrambleswiftVolunteerGuid, guid8, "Background Check", ApprovalsMonth(6), guid8, null)),
new VolunteerFamilyCommandExecuted(adminId, ApprovalsMonth(7),
new CompleteVolunteerFamilyRequirement(guid7, guid2, "Home Screening Checklist", ApprovalsMonth(7), Guid.Empty, null)),
new VolunteerFamilyCommandExecuted(adminId, ApprovalsMonth(8),
new CompleteVolunteerFamilyRequirement(guid7, guid3, "Host Family Interview", ApprovalsMonth(8), Guid.Empty, null)),
new VolunteerCommandExecuted(adminId, ApprovalsMonth(9),
new CompleteVolunteerRequirement(guid7, berrinBrambleswiftGuid, guid9, "Host Family Training", ApprovalsMonth(9), null, null)),
new VolunteerCommandExecuted(adminId, ApprovalsMonth(9),
new CompleteVolunteerRequirement(guid7, eldaBrambleswiftVolunteerGuid, guidA, "Host Family Training", ApprovalsMonth(9), null, null))

);
}

Expand Down

0 comments on commit 7bb531b

Please sign in to comment.