Ejemplo n.º 1
0
 private static void AssertHelpRequestsEquivalence(ResidentSupportAnnexResponse received, ResidentSupportAnnexResponse expected)
 {
     received.Should().BeEquivalentTo(expected, options => options
                                      .Excluding(r => r.IsDuplicate)
                                      .Excluding(r => r.RecordStatus)
                                      .Excluding(r => r.LastConfirmedFoodDelivery));
     received.IsDuplicate.Should().BeEquivalentTo("FALSE");
     received.RecordStatus.Should().BeEquivalentTo("MASTER");
     received.LastConfirmedFoodDelivery.Substring(0, 10).Should()
     .Be(expected.LastConfirmedFoodDelivery.Substring(0, 10));
 }
Ejemplo n.º 2
0
        private static void AssertAllFieldsHaveCorrectlyMapped(ResidentSupportAnnexResponse mappedResponse,
                                                               ResidentSupportAnnex classUnderTest)
        {
            mappedResponse.Id.Should().Be(classUnderTest.Id);
            mappedResponse.IsDuplicate.Should().Be(classUnderTest.IsDuplicate);
            mappedResponse.OngoingFoodNeed.Should().Be(classUnderTest.OngoingFoodNeed);
            mappedResponse.OngoingPrescriptionNeed.Should().Be(classUnderTest.OngoingPrescriptionNeed);
            mappedResponse.FormId.Should().Be(int.Parse(classUnderTest.FormId));
            mappedResponse.FormVersion.Should().Be(classUnderTest.FormVersion);
            mappedResponse.DateTimeRecorded.Should().Be($"{classUnderTest.DateTimeRecorded.Value.Year:0000}-{classUnderTest.DateTimeRecorded.Value.Month:00}-{classUnderTest.DateTimeRecorded.Value.Day:00}");
            mappedResponse.FirstName.Should().Be(classUnderTest.FirstName);
            mappedResponse.LastName.Should().Be(classUnderTest.LastName);
            mappedResponse.DateOfBirth.Should().Be("1960-11-13");
            mappedResponse.Postcode.Should().Be(classUnderTest.Postcode);
            mappedResponse.Uprn.Should().Be(classUnderTest.Uprn);
            mappedResponse.Ward.Should().Be(classUnderTest.Ward);
            mappedResponse.AddressFirstLine.Should().Be(classUnderTest.AddressFirstLine);
            mappedResponse.AddressSecondLine.Should().Be(classUnderTest.AddressSecondLine);
            mappedResponse.AddressThirdLine.Should().Be(classUnderTest.AddressThirdLine);
            mappedResponse.ContactTelephoneNumber.Should().Be(classUnderTest.ContactTelephoneNumber);
            mappedResponse.ContactMobileNumber.Should().Be(classUnderTest.ContactMobileNumber);
            mappedResponse.EmailAddress.Should().Be(classUnderTest.EmailAddress);
            mappedResponse.IsOnBehalf.Should().Be(classUnderTest.IsOnBehalf);
            mappedResponse.OnBehalfFirstName.Should().Be(classUnderTest.OnBehalfFirstName);
            mappedResponse.OnBehalfLastName.Should().Be(classUnderTest.OnBehalfLastName);
            mappedResponse.OnBehalfEmailAddress.Should().Be(classUnderTest.OnBehalfEmailAddress);
            mappedResponse.OnBehalfContactNumber.Should().Be(classUnderTest.OnBehalfContactNumber);
            mappedResponse.RelationshipWithResident.Should().Be(classUnderTest.RelationshipWithResident);
            mappedResponse.AnythingElse.Should().Be(classUnderTest.AnythingElse);
            mappedResponse.GpSurgeryDetails.Should().Be(classUnderTest.GpSurgeryDetails);
            mappedResponse.FoodNeed.Should().Be(classUnderTest.FoodNeed);
            mappedResponse.NumberOfPeopleInHouse.Should().Be(int.Parse(classUnderTest.NumberOfPeopleInHouse));
            mappedResponse.DaysWorthOfFood.Should().Be(int.Parse(classUnderTest.DaysWorthOfFood));
            mappedResponse.AnyFoodHouseholdCannotEat.Should().Be(classUnderTest.AnyFoodHouseholdCannotEat);
            mappedResponse.StrugglingToPayForFood.Should().Be(classUnderTest.StrugglingToPayForFood);
            mappedResponse.IsPharmacistAbleToDeliver.Should().Be(classUnderTest.IsPharmacistAbleToDeliver);
            mappedResponse.NameAddressPharmacist.Should().Be(classUnderTest.NameAddressPharmacist);
            mappedResponse.IsPackageOfCareAsc.Should().Be(classUnderTest.IsPackageOfCareAsc);
            mappedResponse.IsUrgentFoodRequired.Should().Be(classUnderTest.IsUrgentFoodRequired);
            mappedResponse.DaysWorthOfMedicine.Should().Be(int.Parse(classUnderTest.DaysWorthOfMedicine));
            mappedResponse.IsUrgentMedicineRequired.Should().Be(classUnderTest.IsUrgentMedicineRequired);
            mappedResponse.IsAddressConfirmed.Should().Be(classUnderTest.IsAddressConfirmed);
            mappedResponse.IsHouseholdHelpAvailable.Should().Be(classUnderTest.IsHouseholdHelpAvailable);
            mappedResponse.IsUrgentFood.Should().Be(classUnderTest.IsUrgentFood);
            mappedResponse.IsUrgentPrescription.Should().Be(classUnderTest.IsUrgentPrescription);
            mappedResponse.AnyHelpAvailable.Should().Be(classUnderTest.AnyHelpAvailable);
            mappedResponse.IsAnyAgedUnder15.Should().Be(classUnderTest.IsAnyAgedUnder15);

            mappedResponse.LastConfirmedFoodDelivery.Should().Be(classUnderTest.LastConfirmedFoodDelivery.Value.ToString("yyyy-MM-ddTHH:mm:ss"));
            mappedResponse.RecordStatus.Should().Be(classUnderTest.RecordStatus);
            mappedResponse.DeliveryNotes.Should().Be(classUnderTest.DeliveryNotes);
            mappedResponse.CaseNotes.Should().Be(classUnderTest.CaseNotes);
        }