Пример #1
0
        public void Manager_should_return_correct_processor(FeedType type, Type expectedType)
        {
            var factory = new FeedManagerFactory();

            var manager = factory.CreateFeedManager(type);

            manager.FeedProcessor.Should().BeOfType(expectedType);
        }
Пример #2
0
        public void Can_return_correct_manager_for_FeedType(FeedType type, Type expectedType)
        {
            var factory = new FeedManagerFactory();

            var manager = factory.CreateFeedManager(type);

            manager.Should().BeOfType(expectedType);
        }
Пример #3
0
        static void Main(string[] args)
        {
            var factory   = new FeedManagerFactory();
            var feedItems = new Fixture().CreateMany <FeedItem>(10);

            // for getting errors
            feedItems.First().PrincipalId    = null;
            feedItems.Last().SourceAccountId = null;

            var deltaOneManager = factory.CreateFeedManager(FeedType.DeltaOne);

            deltaOneManager.Process(feedItems);

            var emManager = factory.CreateFeedManager(FeedType.Em);

            emManager.Process(feedItems);

            Console.ReadKey();
        }