예제 #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"));
        }