Exemple #1
0
        public void Setup()
        {
            instaApi = new Mock <IInstaApi>();
            mapper   = new Mock <IMapper>();

            subject = new ApiWrapper(instaApi.Object, mapper.Object);
        }
Exemple #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();
 }
Exemple #3
0
        public MessageWindow(List <User> recievers, long senderId, IApiWrapper instaApi)
        {
            this.senderId  = senderId;
            this.recievers = recievers;
            this.instaApi  = instaApi;

            InitializeComponent();
        }
Exemple #4
0
 public AuthService(AuthenticationStateProvider authenticationStateProvider,
                    ILocalStorageService localStorage,
                    IApiWrapper apiWrapper)
 {
     _authenticationStateProvider = authenticationStateProvider;
     _localStorage = localStorage;
     _apiWrapper   = apiWrapper;
 }
Exemple #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);
        }
Exemple #6
0
        //TODO: IMPROVE INTEGRATION TESTS

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