public async Task SetUp() { var logger = new NullLogger <FinderService>(); _finderService = new FinderService(logger); _testData = await GetTestData(); }
public void SetUp() { _addressGeocodingService = new Mock <IAddressGeocodingService>(); _mpFinderRepository = new Mock <IFinderRepository>(); _mpContactRepository = new Mock <IContactRepository>(); _addressService = new Mock <IAddressService>(); _mpParticipantRepository = new Mock <IParticipantRepository>(); _mpGroupToolService = new Mock <IGroupToolService>(); _mpConfigurationWrapper = new Mock <IConfigurationWrapper>(); _addressProximityService = new Mock <IAddressProximityService>(); _apiUserRepository = new Mock <IApiUserRepository>(); _groupService = new Mock <IGroupService>(); _invitationService = new Mock <IInvitationService>(); _mpGroupRepository = new Mock <IGroupRepository>(); _awsCloudsearchService = new Mock <IAwsCloudsearchService>(); _authenticationRepository = new Mock <IAuthenticationRepository>(); _communicationRepository = new Mock <ICommunicationRepository>(); _accountService = new Mock <IAccountService>(); _analyticsService = new Mock <IAnalyticsService>(); _mpFinderServiceMock = new Mock <IFinderService>(MockBehavior.Strict); _lookupService = new Mock <ILookupService>(); _mpConfigurationWrapper.Setup(mocked => mocked.GetConfigIntValue("GroupRoleLeader")).Returns(22); _mpConfigurationWrapper.Setup(mocked => mocked.GetConfigIntValue("ApprovedHostStatus")).Returns(3); _mpConfigurationWrapper.Setup(mocked => mocked.GetConfigIntValue("AnywhereGroupTypeId")).Returns(30); _mpConfigurationWrapper.Setup(mocked => mocked.GetConfigIntValue("SmallGroupTypeId")).Returns(1); _mpConfigurationWrapper.Setup(mocked => mocked.GetConfigValue("FinderConnectFlag")).Returns("CONNECT"); _mpConfigurationWrapper.Setup(mocked => mocked.GetConfigIntValue("Group_Role_Default_ID")).Returns(_memberRoleId); _mpConfigurationWrapper.Setup(mocked => mocked.GetConfigIntValue("AnywhereGatheringInvitationType")).Returns(_anywhereGatheringInvitationTypeId); _mpConfigurationWrapper.Setup(mocked => mocked.GetConfigIntValue("GroupInvitationType")).Returns(_groupInvitationTypeId); _fixture = new FinderService(_addressGeocodingService.Object, _mpFinderRepository.Object, _mpContactRepository.Object, _addressService.Object, _mpParticipantRepository.Object, _mpGroupRepository.Object, _groupService.Object, _mpGroupToolService.Object, _apiUserRepository.Object, _mpConfigurationWrapper.Object, _invitationService.Object, _awsCloudsearchService.Object, _authenticationRepository.Object, _communicationRepository.Object, _accountService.Object, _lookupService.Object, _analyticsService.Object); //force AutoMapper to register AutoMapperConfig.RegisterMappings(); }
static void Main(string[] args) { try{ Console.Write("Digite a hora que deseja saber? "); string time = Console.ReadLine(); Console.Write("Digite o caminho do arquivo CSV? "); string filePath = Console.ReadLine(); Regex timePattern = new Regex(@"^([0-2][0-3]|[0-1][0-9]):[0-5][0-9]+$"); Match match = timePattern.Match(time); if (!File.Exists(filePath)) { throw new FileNotFoundException("Arquivo não encontrado ou caminho invalido."); } if (String.IsNullOrEmpty(time) || String.IsNullOrWhiteSpace(time) || !match.Success) { throw new ArgumentException("Horario inserido invalido."); } IFinderService finderService = new FinderService(); List <string> avaiableRestaurantNames = finderService.GetAvailableRestaurants(time, filePath); Console.WriteLine("[{0}]", String.Join(", ", avaiableRestaurantNames.ToArray())); } catch (ArgumentException error) { Console.WriteLine($"Error: {error.Message}"); } catch (System.Exception error) { Console.WriteLine($"Error: {error.Message}"); } }
public DistByPeriodService(Session session, IClientFactory clientFactory) { finderService = new FinderService(session, clientFactory); }
public TimeQuantityService(Session session, IClientFactory clientFactory) { finderService = new FinderService(session); }
public TransactionTypeService(Session session, IClientFactory clientFactory) { finderService = new FinderService(session); }
public DimensionService(Session session, IClientFactory clientFactory) { _session = session; _processXml = new ProcessXmlService(session, clientFactory); _finderService = new FinderService(session, clientFactory); }
public DimensionGroupService(Session session, IClientFactory clientFactory) { this.session = session; processXml = new ProcessXmlService(session, clientFactory); finderService = new FinderService(session, clientFactory); }
public TranslationService(Session session, IClientFactory clientFactory) { finderService = new FinderService(session, clientFactory); }
public UserRoleService(Session session, IClientFactory clientFactory) { finderService = new FinderService(session, clientFactory); }
public VatNrOfRelationsService(Session session, IClientFactory clientFactory) { finderService = new FinderService(session); }
public VatGroupService(Session session, IClientFactory clientFactory) { finderService = new FinderService(session, clientFactory); }
public InvoiceTypeService(Session session, IClientFactory clientFactory) { finderService = new FinderService(session, clientFactory); }
public SummaryService(Session session, IClientFactory clientFactory) { _finderService = new FinderService(session, clientFactory); }
public CountryService(Session session, IClientFactory clientFactory) { this.session = session; processXml = new ProcessXmlService(session, clientFactory); finderService = new FinderService(session, clientFactory); }
public ReminderScenarioService(Session session, IClientFactory clientFactory) { this.session = session; processXml = new ProcessXmlService(session, clientFactory); finderService = new FinderService(session, clientFactory); }
public SalesInvoiceService(Session session, IClientFactory clienFactory) { this.session = session; processXml = new ProcessXmlService(session, clienFactory); finderService = new FinderService(session, clienFactory); }
public BankTransactionService(Session session, IClientFactory clientFactory) { this.session = session; processXml = new ProcessXmlService(session, clientFactory); finderService = new FinderService(session, clientFactory); }
public FixedAssetService(Session session, IClientFactory clientfactory) { this.session = session; processXml = new ProcessXmlService(session, clientfactory); finderService = new FinderService(session, clientfactory); }