public void casing_sets_source_casing_and_target_casing()
        {
            var converterExtension = new CaseConverterExtension();
            Assert.Equal(CharacterCasing.Normal, converterExtension.SourceCasing);
            Assert.Equal(CharacterCasing.Normal, converterExtension.TargetCasing);

            converterExtension.Casing = CharacterCasing.Upper;
            Assert.Equal(CharacterCasing.Upper, converterExtension.SourceCasing);
            Assert.Equal(CharacterCasing.Upper, converterExtension.TargetCasing);

            converterExtension.Casing = CharacterCasing.Lower;
            Assert.Equal(CharacterCasing.Lower, converterExtension.SourceCasing);
            Assert.Equal(CharacterCasing.Lower, converterExtension.TargetCasing);
        }
        public void provide_value_returns_appropriate_case_converter()
        {
            var converterExtension = new CaseConverterExtension
            {
                SourceCasing = CharacterCasing.Upper,
                TargetCasing = CharacterCasing.Lower
            };
            var caseConverter = converterExtension.ProvideValue(null) as CaseConverter;

            Assert.NotNull(caseConverter);
            Assert.Equal(CharacterCasing.Upper, caseConverter.SourceCasing);
            Assert.Equal(CharacterCasing.Lower, caseConverter.TargetCasing);
        }
 public void casing_throws_if_invalid()
 {
     var converterExtension = new CaseConverterExtension();
     var ex = Assert.Throws<ArgumentException>(() => converterExtension.Casing = (CharacterCasing)100);
     Assert.Equal("Enum value '100' is not defined for enumeration 'System.Windows.Controls.CharacterCasing'.\r\nParameter name: value", ex.Message);
 }
 public void ctor_that_takes_source_casing_and_target_casing_sets_source_casing_and_target_casing()
 {
     var converterExtension = new CaseConverterExtension(CharacterCasing.Upper, CharacterCasing.Lower);
     Assert.Equal(CharacterCasing.Upper, converterExtension.SourceCasing);
     Assert.Equal(CharacterCasing.Lower, converterExtension.TargetCasing);
 }
 public void ctor_sets_target_casing_to_normal()
 {
     var converterExtension = new CaseConverterExtension();
     Assert.Equal(CharacterCasing.Normal, converterExtension.TargetCasing);
 }
 public void ctor_sets_source_casing_to_normal()
 {
     var converterExtension = new CaseConverterExtension();
     Assert.Equal(CharacterCasing.Normal, converterExtension.SourceCasing);
 }