Testing Umbraco 7.3 Current has not been initialized on Umbraco.Core.Persistence.Mappers.MappingResolver
this line works fine and if not found inside DB it creates new one.
GetDictionaryItemByKey
next line GetDictionaryItemChildren throws Exception:
System.InvalidOperationException : Current has not been initialized on Umbraco.Core.Persistence.Mappers.MappingResolver. You must initialize Current before trying to read it.
here ist the whole test class
[TestFixture]
public class TestImport : BaseUmbracoApplicationTest
{
[Test]
public void TestImportDictionary()
{
var dictContainer = ApplicationContext.Current.Services.LocalizationService.GetDictionaryItemByKey("Abteilungen.Intranet") ??
ApplicationContext.Current.Services.LocalizationService.CreateDictionaryItemWithIdentity("Abteilungen.Intranet", null);
var children = ApplicationContext.Services.LocalizationService.GetDictionaryItemChildren(dictContainer.Key);
}
}
Testing Umbraco 7.3 Current has not been initialized on Umbraco.Core.Persistence.Mappers.MappingResolver
this line works fine and if not found inside DB it creates new one.
next line GetDictionaryItemChildren throws Exception:
here ist the whole test class
is working on a reply...