public void GetSettingsItem_SiteDefinitionDoesNotExists_ShouldReturnNull(string settingName, [Frozen]Item contextItem, [Substitute]SiteContext context, Db db, string definitionItemName)
 {
   var provider = new SettingsProvider(context);
   context.GetSiteDefinition(Arg.Any<Item>()).Returns((SiteDefinition)null);
   var settingItem = provider.GetSettingItem(settingName, contextItem);
   settingItem.Should().BeNull();
 }
 public void GetSettingsItem_ShouldReturnSettingItem(string settingName, [Frozen]Item contextItem, [Substitute]SiteContext context, Db db, string definitionItemName)
 {
   var provider = new SettingsProvider(context);
   var settingItemId = ID.NewID;
   var definitionId = ID.NewID;
   db.Add(new DbItem(definitionItemName, definitionId) {new DbItem(SettingsProvider.SettingsRootName) {new DbItem(settingName, settingItemId, Templates.SiteSettings.ID)} });
   var definitionItem = db.GetItem(definitionId);
   var setting = db.GetItem(settingItemId);
   context.GetSiteDefinition(Arg.Any<Item>()).Returns(new SiteDefinition {Item = definitionItem });
   var settingItem = provider.GetSettingItem(settingName, contextItem);
   settingItem.ID.ShouldBeEquivalentTo(setting.ID);
 }