public void Should_return_culture_from_default_culture_on_globalization_configuration() { //Given var context = CreateContextRequest("/"); //When var culture = BuiltInCultureConventions.GlobalizationConfigurationCulture(context, context.Environment.GetValue <GlobalizationConfiguration>()); //Then culture.Name.ShouldEqual("en-US"); }
public void Should_return_first_supported_culture_for_default_culture_on_globalization_configuration() { //Given var context = CreateContextRequest("/"); //When var environment = new DefaultNancyEnvironment(); environment.Globalization(new[] { "en-US" }, defaultCulture: null); var culture = BuiltInCultureConventions.GlobalizationConfigurationCulture(context, environment.GetValue <GlobalizationConfiguration>()); //Then culture.Name.ShouldEqual("en-US"); }