public void GetMashReferralsWithNoQueryReturnsAllMashReferrals()
        {
            var query = TestHelpers.CreateQueryMashReferral();

            query.Id          = null;
            query.WorkerEmail = null;
            const int numberOfMashReferralsToAdd = 5;

            for (var i = 0; i < numberOfMashReferralsToAdd; i++)
            {
                MashReferralHelper.SaveMashReferralToDatabase(DatabaseContext);
            }

            var response = _mashReferralGateway.GetReferralsUsingQuery(query);

            response.ToList().Count.Should().Be(numberOfMashReferralsToAdd);
        }
Exemple #2
0
 public IEnumerable <Boundary.Response.MashReferral> GetMashReferrals(QueryMashReferrals request)
 {
     return(_mashReferralGateway
            .GetReferralsUsingQuery(request)
            .Select(x => x.ToResponse()));
 }