public void BuildsDecisionDate_FromItemPubDate_WithoutTimePart()
        {
            RssItem badDateItem = Prototype();

            badDateItem.SetPubDate(DateTime.Now);

            DecisionModel builtDecision = new DecisionModelRssItemBuilder(badDateItem).Build();

            Assert.AreEqual(builtDecision.Date.Date, builtDecision.Date);
        }
        private static RssItem Prototype()
        {
            var item = new RssItem
            {
                title       = string.Empty,
                description = string.Empty,
                link        = new Uri("http://localhost.dev/").ToString()
            };

            item.SetPubDate(DateTime.Today);
            return(item);
        }
        private static RssItem PrototypeItem()
        {
            DecisionModel decision = PrototypeDecision();
            var           item     = new RssItem
            {
                title       = decision.Titre,
                description = decision.Description,
                link        = decision.Lien.ToString(),
                guid        = new Normacode.RSS.Guid {
                    isPermaLink = false, Value = decision.GetHashCode().ToString()
                }
            };

            item.SetPubDate(decision.Date);
            return(item);
        }
        public RssItem BuildItem()
        {
            var item = new RssItem
            {
                title       = this._builder.EstSupprimée ? RemovedIndicator + this._builder.Titre : this._builder.Titre,
                description = this._builder.Description,
                link        = this._builder.Lien,
                guid        = new Guid {
                    isPermaLink = false, Value = this.ModelHashCode.ToString()
                }
            };

            item.SetPubDate(this._builder.Date);

            return(item);
        }