Esempio n. 1
0
        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();
        }
Esempio n. 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();
        }
 public void TestPushMessage()
 {
     IncomingMessageProcessor processor = new IncomingMessageProcessor(_messageRepository, _tagRepository,  new MockMessageParser(), _target, null);
     _mockProvider = new MockRawMessageProvider(processor);
     _mockProvider.Update();
 }