Ejemplo n.º 1
0
        public void Setup()
        {
            instaApi = new Mock <IInstaApi>();
            mapper   = new Mock <IMapper>();

            subject = new ApiWrapper(instaApi.Object, mapper.Object);
        }
Ejemplo n.º 2
0
 private Node(string ffmpegPath, string apiUri, string logfilesPath, IDictionary <string, string> envorimentVars, ILogger logger, IApiWrapper apiWrapper)
 {
     if (string.IsNullOrWhiteSpace(ffmpegPath))
     {
         throw new ArgumentNullException(nameof(ffmpegPath), "No path specified for FFmpeg binary. Missing configuration setting FfmpegPath");
     }
     if (!File.Exists(ffmpegPath))
     {
         throw new FileNotFoundException(ffmpegPath);
     }
     _ffmpegPath = ffmpegPath;
     if (string.IsNullOrWhiteSpace(apiUri))
     {
         throw new ArgumentNullException(nameof(apiUri), "Api uri supplied");
     }
     if (logger == null)
     {
         throw new ArgumentNullException(nameof(logger));
     }
     if (envorimentVars == null)
     {
         throw new ArgumentNullException(nameof(envorimentVars));
     }
     _timeSinceLastUpdate = new Timer(_ => KillProcess("Timed out"), null, -1, TimeOut);
     _output     = new StringBuilder();
     _logger     = logger;
     _apiWrapper = apiWrapper;
     _logger.Debug("Node started...");
     _logfilesPath   = logfilesPath;
     _envorimentVars = envorimentVars;
     _timeSinceLastProgressUpdate = new Stopwatch();
 }
Ejemplo n.º 3
0
        public MessageWindow(List <User> recievers, long senderId, IApiWrapper instaApi)
        {
            this.senderId  = senderId;
            this.recievers = recievers;
            this.instaApi  = instaApi;

            InitializeComponent();
        }
Ejemplo n.º 4
0
 public AuthService(AuthenticationStateProvider authenticationStateProvider,
                    ILocalStorageService localStorage,
                    IApiWrapper apiWrapper)
 {
     _authenticationStateProvider = authenticationStateProvider;
     _localStorage = localStorage;
     _apiWrapper   = apiWrapper;
 }
Ejemplo n.º 5
0
        public static Task GetNodeTask(string ffmpegPath,
                                       string apiUri,
                                       string logfilesPath,
                                       IDictionary <string, string> envorimentVars,
                                       ILogger logger,
                                       CancellationToken ct,
                                       IApiWrapper apiWrapper = null)
        {
            var t = Task.Run(() =>
                             new Node(ffmpegPath, apiUri, logfilesPath, envorimentVars, logger, apiWrapper ?? new ApiWrapper(apiUri, logger, ct)).Run(ct), ct);

            return(t);
        }
Ejemplo n.º 6
0
        //TODO: IMPROVE INTEGRATION TESTS

        //SETUP
        public ApiWrapperIntegrationTest()
        {
            apiWrapper = new ApiWrapper();
        }
Ejemplo n.º 7
0
 public UserInfo(IApiWrapper api)
 {
     _api = api;
 }
Ejemplo n.º 8
0
 public AccountController(IOptions <ServiceConnection> serviceConnection, IApiWrapper apiWrapper)
 {
     _serviceConnection = serviceConnection;
     this.wrapper       = apiWrapper;
 }
Ejemplo n.º 9
0
 public MainWindow(IApiWrapperBuilder instaApiBuilder)
 {
     InitializeComponent();
     this.instaApi = instaApiBuilder.CreateApi();
     LoadSession();
 }
 public ApiController(IApiWrapper wrapper)
 {
     Wrapper = wrapper;
 }
Ejemplo n.º 11
0
 public Facade(IApiWrapper apiWrapper, IIoTHub iotHub, ILockerPiApiWrapper lockerWrapper)
 {
     this._apiWrapper    = apiWrapper;
     this._iotHub        = iotHub;
     this._lockerWrapper = lockerWrapper;
 }
Ejemplo n.º 12
0
 public Facade(IApiWrapper apiWrapper)
 {
     this.apiWrapper = apiWrapper;
 }
Ejemplo n.º 13
0
 public EngageNet(IApiWrapper apiWrapper)
 {
     _apiWrapper = apiWrapper;
 }
Ejemplo n.º 14
0
 public FundTransferController(IOptions <ServiceConnection> serviceConnection, IApiWrapper apiWrapper)
 {
     _serviceConnection = serviceConnection;
     this.wrapper       = apiWrapper;
 }
Ejemplo n.º 15
0
 public void TestSetup()
 {
     _mockApiWrapper = MockRepository.GenerateMock<IApiWrapper>();
     _engageNet = new EngageNet(_mockApiWrapper);
 }
Ejemplo n.º 16
0
 public Facade(IApiWrapper apiWrapper, IIoTHub iotHub)
 {
     this._apiWrapper = apiWrapper;
     this._iotHub     = iotHub;
 }
Ejemplo n.º 17
0
 public DataService(IApiWrapper apiWrapper, IApiResponseParser apiResponseParser)
 {
     Api = apiWrapper;
     ApiResponseParser = apiResponseParser;
 }