private async Task <List <Provider> > InitializeDataAsync()
        {
            var ProviderService = new ProviderService();

            providerList = await ProviderService.GetAllProviders();

            return(providerList);
        }
示例#2
0
        public void BeAbleToGetAllProvidersFromRepository()
        {
            var mockUnitOfWork = new Mock <IUnitOfWork>();

            mockUnitOfWork.Setup(un => un.ProviderRepository.Get(null, null, ""));
            ProviderService providerService = new ProviderService(mockUnitOfWork.Object);

            IEnumerable <Provider> returnedProviders = providerService.GetAllProviders();

            mockUnitOfWork.VerifyAll();
        }