public void Create_ShouldReturnNewsRepository(NewsRepositoryFactory factory, Db db, string itemName, ID itemId)
 {
   db.Add(new DbItem(itemName, itemId, Templates.NewsFolder.ID));
   var contextItem = db.GetItem(itemId);
   var repo = factory.Create(contextItem);
   repo.Should().BeAssignableTo<INewsRepository>();
 }
 public void Create_ContextItemWithWrongTemplate_ShouldReturnNewsRepository(NewsRepositoryFactory factory, [Content] Item contextItem)
 {
   var repo = factory.Invoking(x => x.Create(contextItem)).ShouldThrow<InvalidDataSourceItemException>();
 }