public ThreadController() { var context = new DefaultDbConext(); _threadRepository = new ThreadRepository(context); _tagRepository = new TagRepository(context); _feedFactory = new FeedFactory(); }
public void Feeds_factory_creates_named_feeds_once() { var factory = new FeedFactory(); var feed = factory.GetFeedOf <TestValue>("Test"); Assert.IsNotNull(feed); var feed2 = factory.GetFeedOf <TestValue>("Test"); Assert.AreSame(feed, feed2); }
protected override void When() { ThrownException = null; try { Feed = FeedFactory.CreatePodcastFeed(PodcastFeedFormat.ATOM, FeedData, null); } catch (Exception e) { ThrownException = e; } }
public ExecutiveTests() { var feedFactory = new FeedFactory(); var scanlinePool = new ScanlinePool(1024); var scanner = new Scanner { Detector = new Detector(feedFactory, scanlinePool), Xray = new FakeXRay(0, 0) }; marshaller = new Marshaller(feedFactory); conveyer = new Conveyer(feedFactory); executive = new Executive(scanner, marshaller, conveyer); }
/// <summary> /// Returns the parsed feed /// </summary> /// <param name="feedContent">the feed document</param> /// <returns>parsed feed</returns> public static Feed GetFeed(string feedContent) { ///Replacing special chars feedContent = feedContent.Replace(((char)0x1C).ToString(), string.Empty); feedContent = feedContent.Replace(((char)65279).ToString(), string.Empty); XDocument document = XDocument.Parse(feedContent); var feedType = GetFeedType(document); var parser = FeedFactory.GetParser(feedType); if (parser != null) { var feed = parser.Parse(feedContent); return(feed.ConvertToFeed()); } else { throw new Exception("Feed is not supported"); } }
public void ItShouldReturnAFeed() { FeedFactory.AssertWasCalled(f => f.CreatePodcastFeed(PodcastFeedFormat.RSS, StreamData, "fred")); }
public GGFactory(IActivityRepository activityRepository, FeedFactory feedFactory) { this.activityRepository = activityRepository; this.feedFactory = feedFactory; }
public TestFeedCreator(FeedFactory feedFactory) { this.feedFactory = feedFactory; }
public ConveyerTests() { feedFactory = new FeedFactory(); conveyer = new Conveyer(feedFactory); }
public FakeDetectorTests() { factory = new FeedFactory(); detector = new Detector(factory, new ScanlinePool(1024)); }
protected override void When() { Feed = FeedFactory.CreatePodcastFeed(PodcastFeedFormat.RSS, FeedData, null); }