I'm trying to unit test the LocalizationService.GetString. I'm using the Moq framework to create mocks of a class with a method I want to test (the target).
the target method I am testing uses the following LocalizationService code:
I've read that you can unit test this with the MemoryLocalizationService class. In my unit test class I have the following code:
var memoryLocalizationService = new MemoryLocalizationService();
memoryLocalizationService.AddString(cultureInfo, "sampleKey", "textIWantToReceive");
I don't know where to go from here and I'm not able to find any examples online. How do I setup the LocalizationService to receive the dictionary from MemoryLocalizationService?
Hello.
I'm trying to unit test the LocalizationService.GetString. I'm using the Moq framework to create mocks of a class with a method I want to test (the target).
the target method I am testing uses the following LocalizationService code:
I've read that you can unit test this with the MemoryLocalizationService class. In my unit test class I have the following code:
I don't know where to go from here and I'm not able to find any examples online. How do I setup the LocalizationService to receive the dictionary from MemoryLocalizationService?
Thanks.