public void When_inserting_and_deleting_local_education_agency_without_education_service_center_should_update_tuples() { Builder .AddLocalEducationAgency(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001)); Builder .DeleteEducationOrganization(9001) .Execute(); EducationOrganizationHelper.ShouldNotContainTuples(Connection, (9001, 9001)); }
When_inserting_and_deleting_organization_department_without_local_education_agency_or_school_should_update_tuples() { Builder .AddOrganizationDepartment(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001)); Builder .DeleteEducationOrganization(9001) .Execute(); EducationOrganizationHelper.ShouldNotContainTuples(Connection, (9001, 9001)); }
public void When_inserting_and_deleting_school_without_local_education_agency_should_update_tuples() { Builder .AddSchool(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001)); Builder .DeleteEducationOrganization(9001) .Execute(); EducationOrganizationHelper.ShouldNotContainTuples(Connection, (9001, 9001)); }
public void When_inserting_and_deleting_community_provider_without_community_organization_should_update_tuples() { Builder .AddCommunityProvider(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001)); Builder .DeleteEducationOrganization(9001) .Execute(); EducationOrganizationHelper.ShouldNotContainTuples(Connection, (9001, 9001)); }
public void When_updating_organization_department_without_school_to_with_school_should_update_tuples() { Builder .AddSchool(900) .AddOrganizationDepartment(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (900, 900), (9001, 9001)); Builder .UpdateOrganizationDepartment(9001, 900) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (900, 900), (9001, 9001), (900, 9001)); }
public void When_updating_organization_department_without_local_education_agency_to_with_local_education_agency_should_update_tuples() { Builder .AddLocalEducationAgency(900) .AddOrganizationDepartment(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (900, 900), (9001, 9001)); Builder .UpdateOrganizationDepartment(9001, 900) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (900, 900), (9001, 9001), (900, 9001)); }
public void When_updating_community_provider_without_community_organization_to_with_community_organization_should_update_tuples() { Builder .AddCommunityOrganization(900) .AddCommunityProvider(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (900, 900), (9001, 9001)); Builder .UpdateCommunityProvider(9001, 900) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (900, 900), (9001, 9001), (900, 9001)); }
public void When_updating_local_education_agency_without_education_service_center_to_with_education_service_center_should_update_tuples() { Builder .AddEducationServiceCenter(900) .AddLocalEducationAgency(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001)); Builder .UpdateLocalEducationAgency(9001, educationServiceCenterId: 900) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001), (900, 9001)); }
public void When_inserting_and_deleting_organization_department_with_school_should_update_tuples() { Builder .AddSchool(900) .AddOrganizationDepartment(9001, 900) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (900, 900), (9001, 9001), (900, 9001)); Builder .DeleteEducationOrganization(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (900, 900)); EducationOrganizationHelper.ShouldNotContainTuples(Connection, (9001, 9001), (900, 9001)); }
public void When_updating_school_with_local_education_agency_to_without_local_education_agency_should_update_tuples() { Builder .AddLocalEducationAgency(900) .AddSchool(9001, 900) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001), (900, 9001)); Builder .UpdateSchool(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001)); EducationOrganizationHelper.ShouldNotContainTuples(Connection, (900, 9001)); }
public void When_updating_local_education_agency_with_state_education_agency_to_without_state_education_agency_should_update_tuples() { Builder .AddStateEducationAgency(9) .AddLocalEducationAgency(9001, stateEducationAgencyId: 9) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001), (9, 9001)); Builder .UpdateLocalEducationAgency(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001)); EducationOrganizationHelper.ShouldNotContainTuples(Connection, (9, 9001)); }
public void When_updating_local_education_agency_from_one_education_service_center_to_another_should_update_tuples() { Builder .AddEducationServiceCenter(800) .AddEducationServiceCenter(900) .AddLocalEducationAgency(9001, educationServiceCenterId: 900) .AddSchool(90011, localEducationAgencyId: 9001) .AddSchool(90012, localEducationAgencyId: 9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples( Connection, (800, 800), (900, 900), (9001, 9001), (90011, 90011), (90012, 90012), (900, 9001), (900, 90011), (900, 90012), (9001, 90011), (9001, 90012)); // Now remove association of LEA to the SEA Builder .UpdateLocalEducationAgency(9001, educationServiceCenterId: 800) .Execute(); EducationOrganizationHelper.ShouldContainTuples( Connection, (800, 800), (900, 900), (9001, 9001), (90011, 90011), (90012, 90012), (800, 9001), (800, 90011), (800, 90012), (9001, 90011), (9001, 90012)); EducationOrganizationHelper.ShouldNotContainTuples(Connection, // Tuples for LEA's previously assigned ESC should have been removed (900, 9001), (900, 90011), (900, 90012)); }
public void When_updating_local_education_agency_with_parent_local_education_agencies_should_update_tuples() { Builder .AddLocalEducationAgency(9001) .AddLocalEducationAgency(9002) .AddLocalEducationAgency(9003) .AddSchool(90011, localEducationAgencyId: 9001) .AddSchool(90012, localEducationAgencyId: 9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001), (9002, 9002), (9003, 9003), (90011, 90011), (90012, 90012), (9001, 90011), (9001, 90012)); // Make 9003 the parent of LEA 9002 Builder .UpdateLocalEducationAgency(9002, parentLocalEducationAgencyId: 9003) .Execute(); EducationOrganizationHelper.ShouldContainTuples(Connection, (9001, 9001), (9002, 9002), (9003, 9003), (90011, 90011), (90012, 90012), (9003, 9002), (9001, 90011), (9001, 90012)); // Make 9002 the parent LEA Builder .UpdateLocalEducationAgency(9001, parentLocalEducationAgencyId: 9002) .Execute(); EducationOrganizationHelper.ShouldContainTuples( Connection, (9001, 9001), (9002, 9002), (9003, 9003), (90011, 90011), (90012, 90012), (9001, 90011), (9001, 90012), (9002, 9001), (9002, 90011), (9002, 90012), (9003, 9002), (9003, 9001), (9003, 90011), (9003, 90012)); // Update LEA 9001 to remove 9002 as its parent LEA Builder .UpdateLocalEducationAgency(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples( Connection, (9001, 9001), (9002, 9002), (9003, 9003), (90011, 90011), (90012, 90012), (9001, 90011), (9001, 90012), // 9002 is no longer the parent of 9001 // (9002, 9001), // (9002, 90011), // (9002, 90012), (9003, 9002)); // 9003 is no longer an ancestor of 9001 through 9002 // (9003, 9001), // (9003, 90011), // (9003, 90012)); EducationOrganizationHelper.ShouldNotContainTuples( Connection, (9002, 9001), (9002, 90011), (9002, 90012), (9003, 9001), (9003, 90011), (9003, 90012)); }
public void When_updating_local_education_agency_with_state_education_agency_and_education_service_center_progressively_to_without_state_education_agency_or_education_service_center_should_update_tuples() { Builder .AddStateEducationAgency(9) .AddEducationServiceCenter(900, stateEducationAgencyId: 9) .AddLocalEducationAgency(9001, stateEducationAgencyId: 9, educationServiceCenterId: 900) .AddSchool(90011, localEducationAgencyId: 9001) .AddSchool(90012, localEducationAgencyId: 9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples( Connection, (9, 9), (900, 900), (9001, 9001), (90011, 90011), (90012, 90012), (9, 900), (9, 9001), (9, 90011), (9, 90012), (900, 9001), (900, 90011), (900, 90012), (9001, 90011), (9001, 90012)); // Remove association of LEA to the ESC Builder .UpdateLocalEducationAgency(9001, stateEducationAgencyId: 9) .Execute(); EducationOrganizationHelper.ShouldContainTuples( Connection, (9, 9), (900, 900), (9001, 9001), (90011, 90011), (90012, 90012), (9, 900), (9, 9001), (9, 90011), (9, 90012), // ESC tuples through LEA should be removed // (900, 9001), // (900, 90011), // (900, 90012), (9001, 90011), (9001, 90012)); EducationOrganizationHelper.ShouldNotContainTuples(Connection, // ESC tuples through LEA should be removed (900, 9001), (900, 90011), (900, 90012)); // Now remove association of LEA to the SEA Builder .UpdateLocalEducationAgency(9001) .Execute(); EducationOrganizationHelper.ShouldContainTuples( Connection, (9, 9), (900, 900), (9001, 9001), (90011, 90011), (90012, 90012), (9, 900), // SEA tuples through LEA should be removed // (9, 9001), // (9, 90011), // (9, 90012), // ESC tuples through LEA should be removed // (900, 9001), // (900, 90011), // (900, 90012), (9001, 90011), (9001, 90012)); EducationOrganizationHelper.ShouldNotContainTuples(Connection, // SEA tuples through LEA should be removed (9, 9001), (9, 90011), (9, 90012), // ESC tuples through LEA should be removed (900, 9001), (900, 90011), (900, 90012)); }