Ejemplo n.º 1
0
 public void Setup()
 {
     _mockApiConnection = MockRepository.GenerateMock<IApiConnection>();
     _mockStreamingManager = MockRepository.GenerateMock<IStreamingManager>();
     _mockMarketInfoServiceFactory = MockRepository.GenerateMock<MarketInfoServiceFactory>();
     _mockAccountInfoServiceFactory = MockRepository.GenerateMock<AccountInfoServiceFactory>();
     _mockCfdMarketServiceFactory = MockRepository.GenerateMock<CfdMarketServiceFactory>();
     _mockOrderServiceFactory = MockRepository.GenerateMock<OrderServiceFactory>();
 }
 internal void SetUpServiceManagerForMocking(IApiConnection apiConnection, MarketInformationServiceFactory marketInformationServiceFactory, AccountInformationServiceFactory accountInformationServiceFactory, CfdMarketServiceFactory cfdMarketServiceFactory, OrderServiceFactory orderServiceFactory, FutureOptionServiceFactory futureOptionServiceFactory, MessageServiceFactory messageServiceFactory, NewsServiceFactory newsServiceFactory, SpreadMarketServiceFactory spreadMarketServiceFactory)
 {
     _apiConnection = apiConnection;
     _marketInformationServiceFactory = marketInformationServiceFactory;
     _accountInformationServiceFactory = accountInformationServiceFactory;
     _cfdMarketServiceFactory = cfdMarketServiceFactory;
     _orderServiceFactory = orderServiceFactory;
     _futureOptionServiceFactory = futureOptionServiceFactory;
     _messageServiceFactory = messageServiceFactory;
     _newsServiceFactory = newsServiceFactory;
     _spreadMarketServiceFactory = spreadMarketServiceFactory;
 }
Ejemplo n.º 3
0
 internal void SetUpServiceManagerForMocking(IApiConnection apiConnection, MarketInformationServiceFactory marketInformationServiceFactory, AccountInformationServiceFactory accountInformationServiceFactory, CfdMarketServiceFactory cfdMarketServiceFactory, OrderServiceFactory orderServiceFactory, FutureOptionServiceFactory futureOptionServiceFactory, MessageServiceFactory messageServiceFactory, NewsServiceFactory newsServiceFactory, SpreadMarketServiceFactory spreadMarketServiceFactory)
 {
     _apiConnection = apiConnection;
     _marketInformationServiceFactory  = marketInformationServiceFactory;
     _accountInformationServiceFactory = accountInformationServiceFactory;
     _cfdMarketServiceFactory          = cfdMarketServiceFactory;
     _orderServiceFactory        = orderServiceFactory;
     _futureOptionServiceFactory = futureOptionServiceFactory;
     _messageServiceFactory      = messageServiceFactory;
     _newsServiceFactory         = newsServiceFactory;
     _spreadMarketServiceFactory = spreadMarketServiceFactory;
 }
        public void Setup()
        {
            _mockApiConnection = MockRepository.GenerateMock<IApiConnection>();
            _mockMarketInformationServiceFactory = MockRepository.GenerateMock<MarketInformationServiceFactory>();
            _mockAccountInformationServiceFactory = MockRepository.GenerateMock<AccountInformationServiceFactory>();
            _mockCfdMarketServiceFactory = MockRepository.GenerateMock<CfdMarketServiceFactory>();
            _mockOrderServiceFactory = MockRepository.GenerateMock<OrderServiceFactory>();
            _mockFutureOptionServiceFactory = MockRepository.GenerateMock<FutureOptionServiceFactory>();
            _mockMessageServiceFactory = MockRepository.GenerateMock<MessageServiceFactory>();
            _mockNewsServiceFactory = MockRepository.GenerateMock<NewsServiceFactory>();
            _spreadMarketServiceFactory = MockRepository.GenerateMock<SpreadMarketServiceFactory>();

            _serviceManager = new ServiceManager();
            _serviceManager.SetUpServiceManagerForMocking(
                _mockApiConnection, 
                _mockMarketInformationServiceFactory, 
                _mockAccountInformationServiceFactory, 
                _mockCfdMarketServiceFactory, 
                _mockOrderServiceFactory, 
                _mockFutureOptionServiceFactory,
                _mockMessageServiceFactory,
                _mockNewsServiceFactory,
                _spreadMarketServiceFactory);
        }
 public void CfdMarketServiceFactoryCreatesCfdMarketServiceWithAValidApiConnection()
 {
     var service = new CfdMarketServiceFactory().Create(_mockApiConnection);
     Assert.IsInstanceOfType(typeof(CfdMarketService), service);
 }