I am trying to setup test framework for my Sitecore solution. In that we are using fakedb to create the sitecore context. We are getting below exception on a static function.
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for 'Sitecore.SecurityModel.License.LicenseManager' threw an exception.
Source=Sitecore.Kernel
StackTrace:
at Sitecore.SecurityModel.License.LicenseManager.DemandRuntime(Boolean acceptExpress)
at Sitecore.Data.Managers.DefaultItemManager.get_FallbackProvider()
at Sitecore.Data.Managers.DefaultItemManager.GetItem(String itemPath, Language language, Version version, Database database, SecurityCheck securityCheck)
at Sitecore.Data.Managers.DefaultItemManager.GetItem(String itemPath, Language language, Version version, Database database)
at Sitecore.Data.Managers.ItemManager.GetItem(String itemPath, Language language, Version version, Database database)
at Foundation.Dictionary.Extensions.SitecoreExtensions.ImageFromMediaLibrary(SitecoreHelper helper, String mediaLibraryImagePath) in C:\Projects\New1\Foundation\Common\code\Dictionary\Extensions\SitecoreExtensions.cs:line 62
at Feature.Menu.Areas.Order.Controllers.MenuController..ctor(IMapper mapper, IProductService productService, ISitecoreProductCategoryService sitecoreProductCategoryService, ISitecoreProductService sitecoreProductService, IContentProvider contentProvider, IOrderProvider orderProvider, IExceptionHandler exceptionHandler, ILanguageHelper languageHelper, IFavoriteItemService favoriteService, IGetProductDetailsQueryHandler productDetailsQueryHandler, IFavoriteItemsQueryHandler favoriteItemsQueryHandler, IStoreDetailsQueryHandler storeDetailsQueryHandler, IProductCommonService productCommonService, IProductService fndationIProductService, IRoundingRules foundationRoundingRules, IFavoriteItemService foundationFavoriteItemService, ISitecoreContext sitecoreContext, ICommonService commonService) in C:\Projects\New1\Feature\Menu\code\Areas\Order\Controllers\MenuController.cs:line 106
This exception was originally thrown at this call stack:
[External Code]
Inner Exception 1:
NullReferenceException: Object reference not set to an instance of an object.