Пример #1
0
        public void SpecialCharacterGetReplacedWithTheirNames()
        {
            var codeNameing = new FakeCodeNamer();

            Assert.Equal(
                "AsteriskAsteriskSpaceAsteriskAsteriskPercentSignCircumflexAccentSpaceCircumflexAccentCircumflexAccentDollarSignSpaceNumberSignNumberSignDollarSign",
                codeNameing.GetEnumMemberName("** **%^ ^^$ ##$"));

            Assert.Equal("_asterisk", codeNameing.GetFieldName("*"));

            Assert.Equal(
                "OneTwoThreeProperty",
                codeNameing.GetPropertyName("123Property"));
        }
Пример #2
0
        public void SpecialCharacterGetReplacedWithTheirNames()
        {
            var codeNameing= new FakeCodeNamer();

            Assert.Equal(
                "AsteriskAsteriskSpaceAsteriskAsteriskPercentSignCircumflexAccentSpaceCircumflexAccentCircumflexAccentDollarSignSpaceNumberSignNumberSignDollarSign",
                codeNameing.GetEnumMemberName("** **%^ ^^$ ##$"));

            Assert.Equal("_asterisk", codeNameing.GetFieldName("*"));

            Assert.Equal(
                "OneTwoThreeProperty",
                codeNameing.GetPropertyName("123Property"));
        }