public void HtmlLocalizer_GetAllStrings_ReturnsAllLocalizedStrings() { // Arrange var stringLocalizer = new TestStringLocalizer(); var htmlLocalizer = new HtmlLocalizer(stringLocalizer); // Act var allLocalizedStrings = htmlLocalizer.GetAllStrings(includeParentCultures: false).ToList(); //Assert Assert.Single(allLocalizedStrings); Assert.Equal("World", allLocalizedStrings.First().Value); }
public void HtmlLocalizer_GetAllStringsIncludeParentCulture_ReturnsAllLocalizedStrings() { // Arrange var stringLocalizer = new TestStringLocalizer(); var htmlLocalizer = new HtmlLocalizer(stringLocalizer); // Act var allLocalizedStrings = htmlLocalizer.GetAllStrings().ToList(); //Assert Assert.Equal(2, allLocalizedStrings.Count); Assert.Equal("World", allLocalizedStrings[0].Value); Assert.Equal("Bar", allLocalizedStrings[1].Value); }