Quantcast
Viewing all articles
Browse latest Browse all 9076

'EPiServer.Find.Framework.SearchClient' threw an exception in MS unit test

I have a Web API controller which use Epi Find to get data and it works perfectly in the website, but fails the MS unit test with following exception: "The type initializer for 'EPiServer.Find.Framework.SearchClient' threw an exception". The exception is thrown at this statement: var client = SearchClient.Instance;

What is the reason that the SearchClient.Instance is not working when the unit TestMethod call the Controller Get method? and how to fix it?


Viewing all articles
Browse latest Browse all 9076

Trending Articles