public void Setup() { LogHelper.ConfigureConsoleLogger(); _repository = Substitute.For <IGuidKeyedRepository <BranchOffice> >(); _serviceUnderTest = new BranchOfficeService( Substitute.For <ITenantEntityAccessChecker>(), Substitute.For <IAccessScopeFilter>(), _repository, Substitute.For <ILogger <BranchOfficeService> >() ); }
public FacturamaApi(string user, string password, string url) { var httpClient = new RestClient(url) { Authenticator = new HttpBasicAuthenticator(user, password) }; Clients = new ClientService(httpClient); Cfdis = new CfdiService(httpClient); Products = new ProductService(httpClient); BranchOffices = new BranchOfficeService(httpClient); Profile = new ProfileService(httpClient); TaxEntities = new TaxEntityService(httpClient); Series = new SerieService(httpClient); Catalogs = new CatalogService(httpClient); Store = new StoreService(httpClient); Charges = new ChargeService(httpClient); }
public FacturamaApi(string user, string password, bool isDevelopment = true) { var url = isDevelopment ? "https://apisandbox.facturama.mx/" : "https://api.facturama.mx/"; var httpClient = new RestClient(url) { Authenticator = new HttpBasicAuthenticator(user, password) }; Clients = new ClientService(httpClient); Cfdis = new CfdiService(httpClient); Products = new ProductService(httpClient); BranchOffices = new BranchOfficeService(httpClient); Profile = new ProfileService(httpClient); TaxEntities = new TaxEntityService(httpClient); Series = new SerieService(httpClient); Catalogs = new CatalogService(httpClient); }
public BranchOfficeController() { userService = new UserService(); branchOfficeService = new BranchOfficeService(); }