public void EntryTest() { FeedParserEventArgs target = new FeedParserEventArgs(); // TODO: Initialize to an appropriate value AtomEntry expected = new AtomEntry(); AtomEntry actual; target.Entry = expected; actual = target.Entry; Assert.AreEqual(expected, actual); }
public void FeedParserEventArgsConstructorTest1() { FeedParserEventArgs target = new FeedParserEventArgs(); Assert.IsNotNull(target); Assert.IsNull(target.Feed); Assert.IsNull(target.Entry); Assert.IsFalse(target.DoneParsing); Assert.IsTrue(target.CreatingEntry); }
public void DiscardEntryTest() { FeedParserEventArgs target = new FeedParserEventArgs(); // TODO: Initialize to an appropriate value bool expected = false; // TODO: Initialize to an appropriate value bool actual; target.DiscardEntry = expected; actual = target.DiscardEntry; Assert.AreEqual(expected, actual); }
/// <summary> /// Event handler. Called when a new list entry is parsed. /// </summary> /// <param name="sender">the object that's sending the evet</param> /// <param name="e">FeedParserEventArguments, holds the feedentry</param> protected void OnParsedNewNicknameEntry(object sender, FeedParserEventArgs e) { if (e == null) { throw new ArgumentNullException("e"); } if (e.CreatingEntry == true) { e.Entry = new NicknameEntry(); } }
public void FeedTest() { FeedParserEventArgs target = new FeedParserEventArgs(); // TODO: Initialize to an appropriate value Assert.IsNull(target.Feed); Assert.IsNull(target.Entry); target = new FeedParserEventArgs(new AtomFeed(new Uri("http://www.test.com/"), null), new AtomEntry()); Assert.IsNotNull(target.Feed); Assert.IsNotNull(target.Entry); }
/// <summary> /// Event handler. Called when a new Google Groups entry is parsed. /// </summary> /// <param name="sender">the object that's sending the evet</param> /// <param name="e">FeedParserEventArguments, holds the feedentry</param> protected void OnParsedNewGroupsItemEntry(object sender, FeedParserEventArgs e) { if (e == null) { throw new ArgumentNullException("e"); } if (e.CreatingEntry == true) { e.Entry = new AppsExtendedEntry(); } }
/// <summary> /// Event handler. Called when a new Google Domain Settings entry is parsed. /// </summary> /// <param name="sender">the object that's sending the evet</param> /// <param name="e">FeedParserEventArguments, holds the feedentry</param> protected void OnParsedNewGoogleMailSettingsItemEntry(object sender, FeedParserEventArgs e) { if (e == null) { throw new ArgumentNullException("e"); } if (e.CreatingEntry == true) { e.Entry = new AdminSettingsEntry(); } }
/// <summary> /// Event handler. Called when a new <code>AppsExtendedEntry</code> is parsed. /// </summary> /// <param name="sender">the object that's sending the event</param> /// <param name="e">FeedParserEventArguments, holds the feedentry</param> protected void OnParsedNewPropertyEntry(object sender, FeedParserEventArgs e) { if (e == null) { throw new ArgumentNullException("e"); } if (e.CreatingEntry && !(e.Entry is AppsExtendedEntry)) { e.Entry = new AppsExtendedEntry(); } }
///////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// /// <summary> /// eventhandling. called when a new entry is parsed /// </summary> /// <param name="sender"> the object which send the event</param> /// <param name="e">FeedParserEventArguments, holds the feedentry</param> /// <returns> </returns> ////////////////////////////////////////////////////////////////////// protected void OnParsedNewEntry(object sender, FeedParserEventArgs e) { if (e == null) { throw new ArgumentNullException("e"); } if (e.CreatingEntry == true) { Tracing.TraceMsg("\t top level event dispatcher - new Entry"); e.Entry = new MyEntry(); } }
////////////////////////////////////////////////////////////////////// /// <summary>Event chaining. We catch this from the AtomFeedParser /// we want to set this to our property, and do not add the entry to the collection /// </summary> /// <param name="sender"> the object which send the event</param> /// <param name="e">FeedParserEventArguments, holds the feed entry</param> /// <returns> </returns> ////////////////////////////////////////////////////////////////////// internal void OnParsedNewEntry(object sender, FeedParserEventArgs e) { // by default, if our event chain is not hooked, add it to the collection Tracing.TraceCall("received new item notification"); Tracing.Assert(e != null, "e should not be null"); if (e == null) { throw new ArgumentNullException("e"); } if (!e.CreatingEntry) { if (e.Entry != null) { // add it to the collection Tracing.TraceMsg("\t new EventEntry found"); this.Entry = e.Entry; e.DiscardEntry = true; } } }