private DbSet <Organisation> MakeOrganisation()
 {
     return(dbHelper.GetAsyncEnabledDbSet(new[]
     {
         orgHelper.GetOrganisationWithName("TEST Ltd")
     }));
 }
Esempio n. 2
0
        public async Task FindMatchingOrganisationsHandler_WithLtdCompany_OneMatches()
        {
            A.CallTo(() => dataAccess.GetOrganisationsBySimpleSearchTerm(A <string> ._, A <Guid> ._))
            .Returns(new[]
            {
                orgHelper.GetOrganisationWithName("Test Ltd"),
                orgHelper.GetOrganisationWithName("tset"),
                orgHelper.GetOrganisationWithName("mfw"),
                orgHelper.GetOrganisationWithName("mfi Kitchens and Showrooms Ltd"),
                orgHelper.GetOrganisationWithName("SEPA England"),
                orgHelper.GetOrganisationWithName("Tesco Recycling")
            });

            var strings = await FindMatchingOrganisationsHandler().HandleAsync(new FindMatchingOrganisations("Test"));

            Assert.Equal(1, strings.Results.Count());
        }