public MessageListViewModelRetreiverStoreNotInViewerTests()
        {
            var fakeStoreNotViewer = new FakeMessageStoreNotViewer();
            var modelFactory       = new FakeMessageStoreViewerFactory(fakeStoreNotViewer, _storeName);

            _messageListViewModelRetriever = new MessageListViewModelRetriever(modelFactory);
        }
        public MessageListViewModelRetrieverFilterStoreErrorTests()
        {
            var fakeStoreNotViewer = new FakeMessageStoreViewerWithGetException();
            var modelFactory       = new FakeMessageStoreViewerFactory(fakeStoreNotViewer, storeName);

            _messageListViewModelRetriever = new MessageListViewModelRetriever(modelFactory);
        }
        public void Establish()
        {
            var fakeStoreNotViewer = new FakeMessageStoreNotViewer();
            var modelFactory       = new FakeMessageStoreViewerFactory(fakeStoreNotViewer, _storeName);

            _messageListViewModelRetriever = new MessageListViewModelRetriever(modelFactory);
        }
        public RepostCommandHandlerMissingStoreTests()
        {
            var fakeMessageStoreFactory = FakeMessageStoreViewerFactory.CreateEmptyFactory();

            _command = new RepostCommand {
                MessageIds = new List <string> {
                    Guid.NewGuid().ToString()
                }, StoreName = _storeName
            };
            _fakeMessageProducer = new FakeMessageProducer();
            _repostHandler       = new RepostCommandHandler(fakeMessageStoreFactory, new FakeMessageProducerFactoryProvider(new FakeMessageProducerFactory(_fakeMessageProducer)), new MessageRecoverer());
        }
        public RepostCommandHandlerMessagesNotFoundTests()
        {
            var fakeStore = new FakeMessageStoreWithViewer();
            var fakeMessageStoreFactory = new FakeMessageStoreViewerFactory(fakeStore, _storeName);

            _command = new RepostCommand {
                MessageIds = new List <string> {
                    Guid.NewGuid().ToString()
                }, StoreName = _storeName
            };
            _fakeMessageProducer = new FakeMessageProducer();
            _repostHandler       = new RepostCommandHandler(fakeMessageStoreFactory, new FakeMessageProducerFactoryProvider(new FakeMessageProducerFactory(_fakeMessageProducer)), new MessageRecoverer());
        }
Exemple #6
0
        public MessageListModelRetrieverFilterOnBodyTests()
        {
            _messages = new List <Message> {
                new Message(new MessageHeader(Guid.NewGuid(), "MyTopic1", MessageType.MT_COMMAND), new MessageBody("topic3")),
                new Message(new MessageHeader(Guid.NewGuid(), "MyTopic2", MessageType.MT_COMMAND), new MessageBody(""))
            };

            var fakeStore = new FakeMessageStoreWithViewer();

            _messages.ForEach(m => fakeStore.Add(m));
            var modelFactory = new FakeMessageStoreViewerFactory(fakeStore, _storeName);

            _messageListViewModelRetriever = new MessageListViewModelRetriever(modelFactory);
        }
        public void Establish()
        {
            var fakeStore = new FakeMessageStoreWithViewer();

            _messageToRepost = new Message(new MessageHeader(Guid.NewGuid(), "a topic", MessageType.MT_COMMAND, DateTime.UtcNow), new MessageBody("body"));
            fakeStore.Add(_messageToRepost);
            var fakeMessageStoreFactory = new FakeMessageStoreViewerFactory(fakeStore, _storeName);

            _command = new RepostCommand {
                MessageIds = new List <string> {
                    _messageToRepost.Header.Id.ToString()
                }, StoreName = _storeName
            };
            _repostHandler = new RepostCommandHandler(fakeMessageStoreFactory, new FakeMessageProducerFactoryProvider(new FakeErrorProducingMessageProducerFactory()), new MessageRecoverer());
        }
Exemple #8
0
        public void Establish()
        {
            _message1 = new Message(new MessageHeader(Guid.NewGuid(), "MyTopic1", MessageType.MT_COMMAND), new MessageBody("a body"));
            var messageHeader = new MessageHeader(Guid.NewGuid(), "MyTopic2", MessageType.MT_COMMAND);

            messageHeader.Bag.Add("bagVal1", "value1");
            messageHeader.Bag.Add("bagVal2", "value2");
            _messages = new List <Message> {
                _message1,
                new Message(messageHeader, new MessageBody(""))
            };

            var fakeStore = new FakeMessageStoreWithViewer();

            _messages.ForEach(m => fakeStore.Add(m));
            var modelFactory = new FakeMessageStoreViewerFactory(fakeStore, storeName);

            _messageListViewModelRetriever = new MessageListViewModelRetriever(modelFactory);
        }
        public void Establish()
        {
            var modelFactory = FakeMessageStoreViewerFactory.CreateEmptyFactory();

            _messageListViewModelRetriever = new MessageListViewModelRetriever(modelFactory);
        }
        public MessageListVIewModelRetrieverFilterNonExistantStoreTests()
        {
            var modelFactory = FakeMessageStoreViewerFactory.CreateEmptyFactory();

            _messageListViewModelRetriever = new MessageListViewModelRetriever(modelFactory);
        }