コード例 #1
0
ファイル: TestSerialization.cs プロジェクト: utunga/Tradeify
        public TestSerialization()
        {
            _singletonTagProvider = new TagRepository();
            _singletonTagProvider.FilePath = "data/initial_tags.json";
            _singletonTagProvider.InitializeFromFile();
            ILocationProvider locationProvider = new MockLocationProvider();

            IMessageParser realMessageParser = new RegexMessageParser(_singletonTagProvider, locationProvider);
            _messageRepository = new MessageRepository();
            _tagRepository = new TagRepository();
            IncomingMessageProcessor incomingMessageProcessor = new IncomingMessageProcessor(_messageRepository, _tagRepository, realMessageParser);
            IRawMessageProvider rawMessageProvider = new MockRawMessageProvider(incomingMessageProcessor);
            rawMessageProvider.Update();
        }
コード例 #2
0
        public TestMessageExecutor()
        {
            MockMessageParser mockParser = new MockMessageParser();
            ignoredUsers = new IgnoredUserRepository();
            //var ignoredUser = MockData.Users[0];
            //signoredUsers.Save(ignoredUser);
            MessageRepository messageRepository = new MessageRepository(ignoredUsers);

            TagRepository tagRepository = new TagRepository();
            IncomingMessageProcessor incomingMessageProcessor = new IncomingMessageProcessor(messageRepository,tagRepository, mockParser);
            //_target = new TagDexQueryExecutor();
            MockRawMessageProvider mockProvider = new MockRawMessageProvider(incomingMessageProcessor);
            _target = messageRepository;
            mockProvider.Update();
        }
コード例 #3
0
 public void TestPushMessage()
 {
     IncomingMessageProcessor processor = new IncomingMessageProcessor(_messageRepository, _tagRepository,  new MockMessageParser(), _target, null);
     _mockProvider = new MockRawMessageProvider(processor);
     _mockProvider.Update();
 }