Example #1
0
        public Synology(IHttpGateway http)
        {
            JsonConvert.DefaultSettings = Settings;

            Http = http;
            Initialize();
        }
Example #2
0
 internal SelfossApi(ConnectionOptions opts, IHttpGateway http)
     : base(opts, http)
 {
     this.Items = new ItemsApi(opts, http);
     this.Tags = new TagsApi(opts, http);
     this.Sources = new SourcesApi(opts, http);
 }
        public MainViewModel(IHttpGateway gateway, ISimilarityStringProcessor processor)
        {
            _gateway             = gateway;
            _similarityProcessor = processor;

            StartCommand = new SimpleCommand(StartExecute);

            Latitude   = 70;
            Longtitude = 30;
        }
Example #4
0
 public ICommand FindFor(IHttpGateway request)
 {
     foreach (IRequestHandler handler in handlers.All( ))
     {
         if (handler.IsSatisfiedBy(request))
         {
             return(handler);
         }
     }
     return(new RedirectCommand( ));
 }
Example #5
0
        public void Should_delegate_to_specification_to_see_if_criteria_is_satisfied( )
        {
            IHttpGateway request = _mockery.DynamicMock <IHttpGateway>( );

            using (_mockery.Record( )) {
                Expect.Call(_mockSpecification.IsSatisfiedBy(request)).Return(true);
            }

            using (_mockery.Playback( )) {
                CreateSUT( ).IsSatisfiedBy(request);
            }
        }
Example #6
0
        public void Should_return_false_if_destination_does_not_contain_command_name( )
        {
            IHttpGateway mockRequest       = _mockery.DynamicMock <IHttpGateway>( );
            string       firstCommandName  = "test.marina";
            string       secondCommandName = "test2.marina";

            using (_mockery.Record( )) {
                SetupResult.For(mockRequest.Destination( )).Return(secondCommandName);
            }
            using (_mockery.Playback( )) {
                Assert.IsFalse(CreateSUT(firstCommandName).IsSatisfiedBy(mockRequest));
            }
        }
Example #7
0
        public void Should_return_true_if_destination_contains_command_name( )
        {
            IHttpGateway mockRequest = _mockery.DynamicMock <IHttpGateway>( );
            string       commandName = "test.marina";

            using (_mockery.Record( )) {
                SetupResult.For(mockRequest.Destination( )).Return(commandName);
            }

            using (_mockery.Playback( )) {
                Assert.IsTrue(CreateSUT(commandName).IsSatisfiedBy(mockRequest));
            }
        }
Example #8
0
        public VendaService(
            IConfiguration configuration,
            IVendaRepository vendaRepository,
            IHttpGateway <PagamentoSignature, PagamentoResult> pagamentoGateway,
            IHttpGateway <EstoqueSignature, EstoqueResult> estoqueGateway,
            IHttpGateway <ProdutoSignature, ProdutoResult> produtoGateway
            )
        {
            _vendaRepository  = vendaRepository;
            _pagamentoGateway = pagamentoGateway;
            _estoqueGateway   = estoqueGateway;
            _produtoGateway   = produtoGateway;

            urlPagamento = configuration.GetSection("Pagamento").Value;
            urlEstoque   = configuration.GetSection("Estoque").Value;
            urlProduto   = configuration.GetSection("Produto").Value;
        }
Example #9
0
 internal BaseApi(ConnectionOptions opts, IHttpGateway http)
 {
     this.Options = opts;
     this.Http = http;
 }
Example #10
0
 internal SourcesApi(ConnectionOptions opts, IHttpGateway http)
     : base(opts, http)
 { }
Example #11
0
 public void Setup()
 {
     _mockery     = new MockRepository( );
     _mockGateway = _mockery.DynamicMock <IHttpGateway>( );
     _pageName    = string.Empty;
 }
Example #12
0
 public WebView(string name, IViewLuggageTransporter <T> viewBag, IHttpGateway gateway)
 {
     this.name    = name;
     this.gateway = gateway;
     this.viewBag = viewBag;
 }
Example #13
0
 public bool IsSatisfiedBy(IHttpGateway item)
 {
     return(_specification.IsSatisfiedBy(item));
 }
Example #14
0
 public View(string name, IHttpGateway gateway)
 {
     _name    = name;
     _gateway = gateway;
 }
Example #15
0
 public SWApiGateway(IConfiguration configuration, IHttpGateway httpGateway)
 {
     _configuration = configuration;
     _httpGateway   = httpGateway;
 }
Example #16
0
 public DownloadStation(IHttpGateway http)
     : base(http)
 {
 }
Example #17
0
 public AvailableSlipsWebView(IViewLuggageTransporter <IEnumerable <SlipDisplayDTO> > viewBag, IHttpGateway gateway)
     : base("AvailableSlips.aspx", viewBag, gateway)
 {
 }
Example #18
0
 public void Setup()
 {
     _mockery     = new MockRepository( );
     _mockViewBag = _mockery.DynamicMock <IViewLuggageTransporter <IEnumerable <SlipDisplayDTO> > >( );
     _mockGateway = _mockery.DynamicMock <IHttpGateway>( );
 }
Example #19
0
 public AuthenticationTask(ICustomerRepository customers, IHttpGateway gateway)
 {
     _customers = customers;
     _gateway   = gateway;
 }
Example #20
0
 public FrontController(IHttpGateway gateway)
 {
     _gateway = gateway;
 }