Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 28, 2011 01:57 PM by francesco abbruzzese
Jun 24, 2011 01:13 PM|LINK
Jun 24, 2011 03:24 PM|LINK
It is quite easy in yur unit test...you don't need to create any class since everything is done with static methods.
You just set manually your Thread UI culture to the neutral one (en-us) and read the list of all static property names.
Then you do a loop on all supported culture, where first set the thread UI culture to the current loop culture, and then you read all property values. In case some value is wrong in a culture you will get either an exception or a empty/null value. This is
your error condition.
Jun 27, 2011 08:48 AM|LINK
Jun 28, 2011 01:57 PM|LINK
I have no sample code for this because I have never written a test for resource files. The reason is simple when you translate a resource file into another language, the error that is more likey to occurr is not that a key is forgotten but that the translator
put the message in the wrong key, that is that the messages are misplaced. The only way to dicover this error is through a manual test performed by someone that undertsnd the translated language.
Thus you have just to prepare a doicument with all steps an user must perform to show all messages and then to verify if each message appear in the right place.