Beispiel #1
0
        public void Test_GetStringForValue_Ok(VehicleType enumValue, string languageName, EnumTranslationType translationType, string expected)
        {
            EnumTranslator enumTranslator = InitTranslations();

            string translation = enumTranslator.GetStringForValue(enumValue, new CultureInfo(languageName), translationType);

            Assert.Equal(expected, translation);
        }
Beispiel #2
0
        public void Test_GetStringForValue_IllegalLanguage_ExpectArgumentException()
        {
            EnumTranslator enumTranslator = InitTranslations();

            Assert.Throws <ArgumentException>(() => enumTranslator.GetStringForValue(VehicleType.Bicycle, new CultureInfo("es")));
        }