public void TestThatDataProviderWhoHandlesPaymentsGetAllReturnsDataProvidersWhoHandlesPayments() { var dataProviders = _systemDataRepository.DataProviderWhoHandlesPaymentsGetAll(); // ReSharper disable PossibleMultipleEnumeration Assert.That(dataProviders, Is.Not.Null); Assert.That(dataProviders, Is.Not.Empty); Assert.That(dataProviders.Count(), Is.EqualTo(1)); // ReSharper restore PossibleMultipleEnumeration }
/// <summary> /// Functionality which handles the query for getting a collection of data providers who handles payments. /// </summary> /// <param name="query">Query for getting a collection of data providers who handles payments.</param> /// <returns>Collection of data providers who handles payments.</returns> public virtual IEnumerable <DataProviderView> Query(DataProviderWhoHandlesPaymentsCollectionGetQuery query) { if (query == null) { throw new ArgumentNullException("query"); } var translationInfo = _systemDataRepository.Get <ITranslationInfo>(query.TranslationInfoIdentifier); var dataProviders = _systemDataRepository.DataProviderWhoHandlesPaymentsGetAll(); return(_foodWasteObjectMapper.Map <IEnumerable <IDataProvider>, IEnumerable <DataProviderView> >(dataProviders, translationInfo.CultureInfo)); }