Exemple #1
0
        public void CreateNewMashReferral()
        {
            var dateTime = DateTime.Now;

            _systemTime.Setup(x => x.Now).Returns(dateTime);
            var request = TestHelpers.CreateNewMashReferralRequest();

            var referral = _mashReferralGateway.CreateReferral(request);

            referral.Referrer.Should().BeEquivalentTo(request.Referrer);
            referral.RequestedSupport.Should().BeEquivalentTo(request.RequestedSupport);
            referral.ReferralDocumentURI.Should().BeEquivalentTo(request.ReferralUri);
            referral.Stage.Should().BeEquivalentTo("CONTACT");
            referral.ReferralCreatedAt.Should().Be(dateTime);
            referral.MashResidents.Count.Should().Be(request.MashResidents.Count);

            for (var i = 0; i < request.MashResidents.Count; i++)
            {
                var firstResident        = referral.MashResidents[i];
                var requestFirstResident = request.MashResidents[i];
                firstResident.FirstName.Should().BeEquivalentTo(requestFirstResident.FirstName);
                firstResident.LastName.Should().BeEquivalentTo(requestFirstResident.LastName);
                firstResident.Address.Should().BeEquivalentTo(requestFirstResident.Address);
                firstResident.Ethnicity.Should().BeEquivalentTo(requestFirstResident.Ethnicity);
                firstResident.Gender.Should().BeEquivalentTo(requestFirstResident.Gender);
                firstResident.Postcode.Should().BeEquivalentTo(requestFirstResident.Postcode);
                firstResident.School.Should().BeEquivalentTo(requestFirstResident.School);
                firstResident.FirstLanguage.Should().BeEquivalentTo(requestFirstResident.FirstLanguage);
                firstResident.DateOfBirth.Should().Be(requestFirstResident.DateOfBirth);
            }
        }
Exemple #2
0
 public void CreateNewMashReferral(CreateReferralRequest request)
 {
     _mashReferralGateway.CreateReferral(request);
 }