public void Get_NotDictionaryRootItem_ThrowConfigurationErrorException(Db db, DictionaryRepository repository)
    {
      //Arrange
      var siteContext = new FakeSiteContext(new StringDictionary()
      {
        ["dictionaryPath"] = "/sitecore/content/dictionaryPath",
        ["database"] = "master"
      });

      //Assert
      using (new SiteContextSwitcher(siteContext))
      {
        repository.Invoking(x => x.Get(siteContext)).ShouldThrow<ConfigurationErrorsException>();
      }
    }
    public void Get_DictionaryRootItemExists_ThrowConfigurationErrorException(Db db, [Content]DbItem item, DictionaryRepository repository)
    {
      //Arrange
      var siteContext = new FakeSiteContext(new StringDictionary()
      {
        ["dictionaryPath"] = item.FullPath,
        ["database"] = "master"
      });

      //Assert
      using (new SiteContextSwitcher(siteContext))
      {
        repository.Get(siteContext).Root.ID.Should().Be(item.ID);
      }
    }
    public void Get_AutocreateNotSet_ReturnFalse([Content]DbItem item, DictionaryRepository repository)
    {
      //Arrange
      var siteContext = new FakeSiteContext(new StringDictionary()
      {
        ["dictionaryPath"] = item.FullPath,
        ["database"] = "master"
      });
      
      using (new SiteContextSwitcher(siteContext))
      {
        //Act
        var result = repository.Get(siteContext);

        //Assert
        result.AutoCreate.Should().BeFalse();
      }
    }
 public void Get_NotConfiguredPath_ThrowConfigurationErrorException(FakeSiteContext siteContext, DictionaryRepository repository)
 {
   repository.Invoking(x => x.Get(siteContext)).ShouldThrow<ConfigurationErrorsException>();
 }