chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
0 votes
Hi,
I am trying to write unit test for a function which has a feature to take a string from a embedded resource file. Actually I used GetString method of ResourceManager instance for localization. When I wrote a unit test for this function I got the error "Test method xxx threw exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --->System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "yyy.zzz.resources" was correctly embedded or linked into assembly "yyy" at compile time, or that all the satellite assemblies are loadable and fully signed."
But my resource file is allready embedded; and I set the CurrentCulture and CurrentUICulture of Thread in my unit test before I create the instance of tested class. Could you inform me how to overcome this situation?
Thank you.
asked by mkg (4.3k points)

1 Answer

0 votes
Hi,

Are you using the Isolator in this test?
Can you post a sample code of the test?
answered by ohad (35.4k points)
...