public void BeAnAggregateRoot()
        {
            var result = NewsRssSource.Create(
                name: "Test",
                url: "Source",
                isEnabled: true);

            result.ShouldBeAssignableTo <IAggregateRoot>();
        }
        public void BeCreated_UsingCreate_Method()
        {
            var result = NewsRssSource.Create(
                name: "Test",
                url: "Source",
                isEnabled: true);

            result.ShouldNotBeNull();
            result.Name.ShouldBe("Test");
            result.Url.ShouldBe("Source");
            result.IsEnabled.ShouldBeTrue();
        }
        protected override void Seed(NewsContext context)
        {
            var defaultRssSources = new List <NewsRssSource>
            {
                NewsRssSource.Create("Nasdaq: Business News", "http://articlefeeds.nasdaq.com/nasdaq/categories?category=Business", true),
                NewsRssSource.Create("Nasdaq: Forex and currencies", "http://articlefeeds.nasdaq.com/nasdaq/categories?category=Forex+and+Currencies", true),
                NewsRssSource.Create("DailyFX: Forex market news and analysis", "https://rss.dailyfx.com/feeds/all", true)
            };

            context.Set <NewsRssSource>().AddOrUpdate(x => x.Url, defaultRssSources.ToArray());

            context.SaveChanges();
        }