コード例 #1
0
    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>();
      }
    }
コード例 #2
0
 public void Get_NotConfiguredPath_ThrowConfigurationErrorException(FakeSiteContext siteContext, DictionaryRepository repository)
 {
   repository.Invoking(x => x.Get(siteContext)).ShouldThrow<ConfigurationErrorsException>();
 }