J
james_c
Hi,
I am writing some unit tests for my windows mobile application.
Unfortunately, some of the code I want to test uses localization strings,
which blow-up my unit tests. I'm guessing this is because the language DLL's
are not being correctly found. Does anyone know how to solve this?
Here's a code snippet example of my unit test that blows up:
[TestMethod()]
public void GetStringsResourceManagerTest()
{
ResourceManager actual;
actual = Utils.GetStringsResourceManager();
Assert.IsNotNull(actual);
String lblPassword = actual.GetString("ACCOUNT_PASSWORD");
Assert.Equals(lblPassword, "PIN");
}
The call to GetString("ACCOUNT_PASSWORD") is throwing the following exception:
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture,
Boolean createIfNotExists, Boolean tryParents)
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture,
Boolean createIfNotExists, Boolean tryParents)
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture,
Boolean createIfNotExists, Boolean tryParents)
System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
System.Resources.ResourceManager.GetString(String name)
MobileUnitTests.UtilsTest.GetStringsResourceManagerTest()
Thanks in advance for any help!
I am writing some unit tests for my windows mobile application.
Unfortunately, some of the code I want to test uses localization strings,
which blow-up my unit tests. I'm guessing this is because the language DLL's
are not being correctly found. Does anyone know how to solve this?
Here's a code snippet example of my unit test that blows up:
[TestMethod()]
public void GetStringsResourceManagerTest()
{
ResourceManager actual;
actual = Utils.GetStringsResourceManager();
Assert.IsNotNull(actual);
String lblPassword = actual.GetString("ACCOUNT_PASSWORD");
Assert.Equals(lblPassword, "PIN");
}
The call to GetString("ACCOUNT_PASSWORD") is throwing the following exception:
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture,
Boolean createIfNotExists, Boolean tryParents)
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture,
Boolean createIfNotExists, Boolean tryParents)
System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture,
Boolean createIfNotExists, Boolean tryParents)
System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
System.Resources.ResourceManager.GetString(String name)
MobileUnitTests.UtilsTest.GetStringsResourceManagerTest()
Thanks in advance for any help!