public void GetReferralUsingIdReturnsDomainMashReferral() { const long referralId = 1L; var referral = MashReferralHelper.SaveMashReferralToDatabase(DatabaseContext, mashReferralId: referralId); for (var i = 0; i < 8; i++) { MashResidentHelper.SaveMashResidentToDatabase(DatabaseContext, referralId); } var response = _mashReferralGateway.GetReferralUsingId(referral.Id); response.Should().BeEquivalentTo(referral.ToDomain(), options => { options.Using <DateTime>(ctx => ctx.Subject.Should().BeCloseTo(ctx.Expectation, 1000)).WhenTypeIs <DateTime>(); return(options); }); }
public Boundary.Response.MashReferral?GetMashReferralUsingId(long requestId) { return(_mashReferralGateway .GetReferralUsingId(requestId) ?.ToResponse()); }