public void Validation_should_return_true_if_valid_culture_name(string cultureName)
        {
            //Given/When
            var result = BuiltInCultureConventions.IsValidCultureInfoName(cultureName);

            //Then
            result.ShouldBeTrue();
        }
        public void Validation_should_return_false_if_null_culture_name()
        {
            //Given/When
            var result = BuiltInCultureConventions.IsValidCultureInfoName(null);

            //Then
            result.ShouldBeFalse();
        }
예제 #3
0
        public void Validation_should_return_true_if_valid_culture_name(string cultureName)
        {
            //Given/When
            var configuration = new GlobalizationConfiguration(new[] { cultureName }, cultureName);
            var result        = BuiltInCultureConventions.IsValidCultureInfoName(cultureName, configuration);

            //Then
            result.ShouldBeTrue();
        }
예제 #4
0
        public void Validation_should_return_false_if_invalid_culture_name(string cultureName)
        {
            //Given/When
            var configuration = new GlobalizationConfiguration(Enumerable.Empty <string>());
            var result        = BuiltInCultureConventions.IsValidCultureInfoName(cultureName, configuration);

            //Then
            result.ShouldBeFalse();
        }