public void TestGetSupportedOperationsDisplayItemsWithBool(string cultureName, string search, string expected) { if (!string.IsNullOrEmpty(cultureName)) { var culture = CultureInfo.CreateSpecificCulture(cultureName); Thread.CurrentThread.CurrentCulture = culture; Thread.CurrentThread.CurrentUICulture = culture; I18NHelper.LoadLanguage(culture.TwoLetterISOLanguageName); } else { I18NHelper.LoadDefaultLanguage(); } var items = OperationHelper.GetSupportedOperationsDisplayItemsLocalized(typeof(string)); Assert.IsNotNull(items); Assert.IsTrue(items.Length > 0); // Act var result = items.FirstOrDefault(x => x.Id == search); // Assert Assert.IsNotNull(result); Assert.AreEqual(expected, result.Name); }