public void Should_return_null_if_form_populated_with_invalid_culture(string cultureName)
        {
            //Given
            var context = PopulateForm(cultureName);

            //When
            var culture = BuiltInCultureConventions.FormCulture(context);

            //Then
            culture.ShouldBeNull();
        }
        public void Should_return_culture_if_form_populated()
        {
            //Given
            var context = PopulateForm("en-GB");

            //When
            var culture = BuiltInCultureConventions.FormCulture(context);

            //Then
            culture.Name.ShouldEqual("en-GB");
        }
Exemplo n.º 3
0
        public void Should_return_culture_if_form_populated()
        {
            //Given
            var context = PopulateForm("en-GB");

            //When
            var culture = BuiltInCultureConventions.FormCulture(context, new GlobalizationConfiguration(new[] { "en-GB" }, "en-GB"));

            //Then
            culture.Name.ShouldEqual("en-GB");
        }
        public void Should_return_null_if_form_not_populated()
        {
            //Given
            var context = CreateContextRequest("/");

            //When
            var culture = BuiltInCultureConventions.FormCulture(context);

            //Then
            culture.ShouldBeNull();
        }
Exemplo n.º 5
0
        public void Should_return_null_if_form_not_populated()
        {
            //Given
            var context = CreateContextRequest("/");

            //When
            var culture = BuiltInCultureConventions.FormCulture(context, context.Environment.GetValue <GlobalizationConfiguration>());

            //Then
            culture.ShouldBeNull();
        }